Soem corrections for SetSize changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 1999-02-22 13:28:13 +00:00
parent bfc6fde4b1
commit 2de8030dbe
4 changed files with 10 additions and 10 deletions

View File

@ -252,7 +252,7 @@ void wxDialog::SetClientSize(int width, int height)
{ {
HWND hWnd = (HWND) GetHWND(); HWND hWnd = (HWND) GetHWND();
RECT rect; RECT rect;
GetClientRect(hWnd, &rect); ::GetClientRect(hWnd, &rect);
RECT rect2; RECT rect2;
GetWindowRect(hWnd, &rect2); GetWindowRect(hWnd, &rect2);

View File

@ -167,7 +167,7 @@ WXHMENU wxFrame::GetWinMenu() const
void wxFrame::GetClientSize(int *x, int *y) const void wxFrame::GetClientSize(int *x, int *y) const
{ {
RECT rect; RECT rect;
GetClientRect((HWND) GetHWND(), &rect); ::GetClientRect((HWND) GetHWND(), &rect);
if ( GetStatusBar() ) if ( GetStatusBar() )
{ {
@ -191,7 +191,7 @@ void wxFrame::DoSetClientSize(int width, int height)
HWND hWnd = (HWND) GetHWND(); HWND hWnd = (HWND) GetHWND();
RECT rect; RECT rect;
GetClientRect(hWnd, &rect); ::GetClientRect(hWnd, &rect);
RECT rect2; RECT rect2;
GetWindowRect(hWnd, &rect2); GetWindowRect(hWnd, &rect2);
@ -657,7 +657,7 @@ bool wxFrame::MSWOnPaint()
if (the_icon) if (the_icon)
{ {
RECT rect; RECT rect;
GetClientRect((HWND) GetHWND(), &rect); ::GetClientRect((HWND) GetHWND(), &rect);
int icon_width = 32; int icon_width = 32;
int icon_height = 32; int icon_height = 32;
int icon_x = (int)((rect.right - icon_width)/2); int icon_x = (int)((rect.right - icon_width)/2);

View File

@ -167,7 +167,7 @@ wxMDIParentFrame::~wxMDIParentFrame(void)
void wxMDIParentFrame::GetClientSize(int *x, int *y) const void wxMDIParentFrame::GetClientSize(int *x, int *y) const
{ {
RECT rect; RECT rect;
GetClientRect((HWND) GetHWND(), &rect); ::GetClientRect((HWND) GetHWND(), &rect);
int cwidth = rect.right; int cwidth = rect.right;
int cheight = rect.bottom; int cheight = rect.bottom;
@ -731,7 +731,7 @@ void wxMDIChildFrame::SetClientSize(int width, int height)
HWND hWnd = (HWND) GetHWND(); HWND hWnd = (HWND) GetHWND();
RECT rect; RECT rect;
GetClientRect(hWnd, &rect); ::GetClientRect(hWnd, &rect);
RECT rect2; RECT rect2;
GetWindowRect(hWnd, &rect2); GetWindowRect(hWnd, &rect2);

View File

@ -670,12 +670,12 @@ void wxWindow::GetClientSize(int *x, int *y) const
{ {
HWND hWnd = (HWND) GetHWND(); HWND hWnd = (HWND) GetHWND();
RECT rect; RECT rect;
GetClientRect(hWnd, &rect); ::GetClientRect(hWnd, &rect);
*x = rect.right; *x = rect.right;
*y = rect.bottom; *y = rect.bottom;
} }
void wxWindow::SetSize(int x, int y, int width, int height, int sizeFlags) void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{ {
int currentX, currentY; int currentX, currentY;
GetPosition(&currentX, &currentY); GetPosition(&currentX, &currentY);
@ -706,14 +706,14 @@ void wxWindow::SetSize(int x, int y, int width, int height, int sizeFlags)
MoveWindow(hWnd, actualX, actualY, actualWidth, actualHeight, (BOOL)TRUE); MoveWindow(hWnd, actualX, actualY, actualWidth, actualHeight, (BOOL)TRUE);
} }
void wxWindow::SetClientSize(int width, int height) void wxWindow::DoSetClientSize(int width, int height)
{ {
wxWindow *parent = GetParent(); wxWindow *parent = GetParent();
HWND hWnd = (HWND) GetHWND(); HWND hWnd = (HWND) GetHWND();
HWND hParentWnd = (HWND) (HWND) parent->GetHWND(); HWND hParentWnd = (HWND) (HWND) parent->GetHWND();
RECT rect; RECT rect;
GetClientRect(hWnd, &rect); ::GetClientRect(hWnd, &rect);
RECT rect2; RECT rect2;
GetWindowRect(hWnd, &rect2); GetWindowRect(hWnd, &rect2);