Skip to content
Permalink
Browse files

Merge pull request #39 from HotKeyIt/master

Set correct size for child gui on Gui, Show
  • Loading branch information...
HotKeyIt committed Nov 29, 2015
2 parents d826aec + 430266d commit 44f439f4e1f475d8b268715df7bcf0d57705c280
Showing with 1 addition and 1 deletion.
  1. +1 −1 source/script_gui.cpp
@@ -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.

0 comments on commit 44f439f

Please sign in to comment.
You can’t perform that action at this time.