Skip to content

Commit

Permalink
Merge pull request #39 from HotKeyIt/master
Browse files Browse the repository at this point in the history
Set correct size for child gui on Gui, Show
  • Loading branch information
HotKeyIt committed Nov 29, 2015
2 parents d826aec + 430266d commit 44f439f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/script_gui.cpp
Expand Up @@ -6986,7 +6986,7 @@ ResultType GuiType::Show(LPTSTR aOptions, LPTSTR aText)
// If the window has a border or caption this also changes top & left *slightly* from zero.
RECT rect = {0, 0, width, height}; // left,top,right,bottom
LONG style = GetWindowLong(mHwnd, GWL_STYLE);
AdjustWindowRectEx(&rect, style, GetMenu(mHwnd) ? TRUE : FALSE
AdjustWindowRectEx(&rect, style, !GetParent(mHwnd) && GetMenu(mHwnd) ? TRUE : FALSE
, GetWindowLong(mHwnd, GWL_EXSTYLE));
width = rect.right - rect.left; // rect.left might be slightly less than zero.
height = rect.bottom - rect.top; // rect.top might be slightly less than zero. A status bar is properly handled since it's inside the window's client area.
Expand Down

0 comments on commit 44f439f

Please sign in to comment.