fix wxMDIChidFrame::GetPosition() (patch 1626610)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-01-07 16:42:00 +00:00
parent 35c4b4da0a
commit 3e85709e97
2 changed files with 16 additions and 0 deletions

View File

@@ -178,6 +178,7 @@ public:
virtual bool Show(bool show = true);
protected:
virtual void DoGetScreenPosition(int *x, int *y) const;
virtual void DoGetPosition(int *x, int *y) const;
virtual void DoSetClientSize(int width, int height);
virtual void InternalSetMenuBar();

View File

@@ -859,6 +859,21 @@ void wxMDIChildFrame::DoSetClientSize(int width, int height)
GetEventHandler()->ProcessEvent(event);
}
// Unlike other wxTopLevelWindowBase, the mdi child's "GetPosition" is not the
// same as its GetScreenPosition
void wxMDIChildFrame::DoGetScreenPosition(int *x, int *y) const
{
HWND hWnd = GetHwnd();
RECT rect;
::GetWindowRect(hWnd, &rect);
if (x)
*x = rect.left;
if (y)
*y = rect.top;
}
void wxMDIChildFrame::DoGetPosition(int *x, int *y) const
{
RECT rect;