Fix client coordinates mapping for wxSpinCtrl in wxMSW
Add MSWDoClientToScreen() and MSWDoScreenToClient() helpers and use them with the correct HWND in DoClientToScreen() and DoScreenToClient() overridden in wxSpinCtrl, i.e. the HWND of the "buddy" text control and not the spin button, which is the main HWND of this control. This notably fixes wxSpinCtrl::GetScreenPosition() which returned the position of the spin button. Closes https://github.com/wxWidgets/wxWidgets/pull/1454 Closes #18455.
This commit is contained in:
@@ -120,6 +120,8 @@ protected:
|
||||
virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const wxOVERRIDE;
|
||||
virtual void DoGetSize(int *width, int *height) const wxOVERRIDE;
|
||||
virtual void DoGetClientSize(int *x, int *y) const wxOVERRIDE;
|
||||
virtual void DoClientToScreen(int *x, int *y) const wxOVERRIDE;
|
||||
virtual void DoScreenToClient(int *x, int *y) const wxOVERRIDE;
|
||||
#if wxUSE_TOOLTIPS
|
||||
virtual void DoSetToolTip( wxToolTip *tip ) wxOVERRIDE;
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
|
Reference in New Issue
Block a user