Fixed window width and height problem by using SM_CXPADDEDBORDER
But it would be nicer to define this somewhere by: #ifndef SM_CXPADDEDBORDER #define SM_CXPADDEDBORDER 92 #endif
This commit is contained in:
parent
d5e2103d58
commit
0d7cbfd463
1 changed files with 2 additions and 2 deletions
|
@ -1954,10 +1954,10 @@ static void GetWidthHeight(int& nWidth, int& nHeight)
|
|||
{
|
||||
nWidth = g_nViewportCX + VIEWPORTX*2
|
||||
+ BUTTONCX
|
||||
+ GetSystemMetrics(SM_CXBORDER)*2
|
||||
+ (GetSystemMetrics(SM_CXBORDER) + GetSystemMetrics(92)) * 2 // 92 = SM_CXPADDEDBORDER
|
||||
+ MAGICX;
|
||||
nHeight = g_nViewportCY + VIEWPORTY*2
|
||||
+ GetSystemMetrics(SM_CYBORDER)
|
||||
+ (GetSystemMetrics(SM_CYBORDER) + GetSystemMetrics(92)) * 2 // 92 = SM_CXPADDEDBORDER
|
||||
+ GetSystemMetrics(SM_CYCAPTION)
|
||||
+ MAGICY;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue