bool wxScreenDC::StartDrawingOnTop( wxWindow *window ) { if (!window) return StartDrawingOnTop(); int x = 0; int y = 0; window->GetPosition( &x, &y ); int w = 0; int h = 0; window->GetSize( &w, &h ); window->ClientToScreen( &x, &y ); wxRect rect; rect.x = x; rect.y = y; rect.width = 0; rect.height = 0; return StartDrawingOnTop( &rect ); }
bool wxScreenDCImpl::StartDrawingOnTop(wxWindow* window) { wxRect rect; int x, y, width, height; window->GetPosition(& x, & y); if (window->GetParent() && !window->IsKindOf(CLASSINFO(wxFrame))) window->GetParent()->ClientToScreen(& x, & y); window->GetSize(& width, & height); rect.x = x; rect.y = y; rect.width = width; rect.height = height; return StartDrawingOnTop(& rect); }