X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2bda0e173844e8e0f8acf4e8ad8b5c26e5c6fe5d..02e8b2f9fbdfcd25080c42082d637da257c20094:/src/msw/stattext.cpp?ds=sidebyside diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp index 10a2141417..e203b5ebd7 100644 --- a/src/msw/stattext.cpp +++ b/src/msw/stattext.cpp @@ -32,11 +32,11 @@ IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl) #endif -bool wxStaticText::Create(wxWindow *parent, const wxWindowID id, +bool wxStaticText::Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos, const wxSize& size, - const long style, + long style, const wxString& name) { SetName(name); @@ -92,7 +92,7 @@ bool wxStaticText::Create(wxWindow *parent, const wxWindowID id, return TRUE; } -void wxStaticText::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) +void wxStaticText::SetSize(int x, int y, int width, int height, int sizeFlags) { int currentX, currentY; GetPosition(¤tX, ¤tY); @@ -104,6 +104,8 @@ void wxStaticText::SetSize(const int x, const int y, const int width, const int if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) y1 = currentY; + AdjustForParentClientOrigin(x1, y1, sizeFlags); + int actualWidth = width; int actualHeight = height; @@ -137,22 +139,11 @@ void wxStaticText::SetSize(const int x, const int y, const int width, const int } MoveWindow((HWND) GetHWND(), x1, y1, actualWidth, actualHeight, TRUE); - - if (!((width == -1) && (height == -1))) - { -#if WXWIN_COMPATIBILITY - GetEventHandler()->OldOnSize(actualWidth, actualHeight); -#else - wxSizeEvent event(wxSize(actualWidth, actualHeight), m_windowId); - event.eventObject = this; - GetEventHandler()->ProcessEvent(event); -#endif - } } void wxStaticText::SetLabel(const wxString& label) { - float w, h; + int w, h; RECT rect; wxWindow *parent = GetParent(); @@ -174,7 +165,7 @@ void wxStaticText::SetLabel(const wxString& label) SetWindowText((HWND) GetHWND(), (const char *)label); } -WXHBRUSH wxStaticText::OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor, +WXHBRUSH wxStaticText::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { /*