int wxDisplayFactoryWin32Base::GetFromPoint(const wxPoint& pt) { POINT pt2; pt2.x = pt.x; pt2.y = pt.y; return FindDisplayFromHMONITOR(gs_MonitorFromPoint(pt2, MONITOR_DEFAULTTONULL)); }
int wxDisplayFactoryMSW::GetFromWindow(const wxWindow *window) { #ifdef __WXMSW__ return FindDisplayFromHMONITOR(::MonitorFromWindow(GetHwndOf(window), MONITOR_DEFAULTTONULL)); #else const wxSize halfsize = window->GetSize() / 2; wxPoint pt = window->GetScreenPosition(); pt.x += halfsize.x; pt.y += halfsize.y; return GetFromPoint(pt); #endif }
int wxDisplayFactoryWin32Base::GetFromWindow(const wxWindow *window) { return FindDisplayFromHMONITOR(gs_MonitorFromWindow(GetHwndOf(window), MONITOR_DEFAULTTONULL)); }