Skip to content

Commit

Permalink
Set correct size for child gui on Gui, Show
Browse files Browse the repository at this point in the history
  • Loading branch information
HotKeyIt committed Nov 29, 2015
1 parent f4b6ef5 commit 11d00ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/script_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7092,7 +7092,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 11d00ee

Please sign in to comment.