Return full virtual screen size from wxScreenDC::GetSize() in wxMSW
Return the size of the entire virtual screen, possibly composed from multiple monitors, rather than just the size of the primary monitor. This makes this method consistent with wxScreenDC actually representing the entire virtual screen and not just the primary monitor and also with wxGTK. Closes #13279.
This commit is contained in:
committed by
Vadim Zeitlin
parent
2567f4222d
commit
00526cefb6
@@ -26,7 +26,7 @@
|
||||
|
||||
wxIMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxMSWDCImpl);
|
||||
|
||||
// Create a DC representing the whole screen
|
||||
// Create a DC representing the whole virtual screen (all monitors)
|
||||
wxScreenDCImpl::wxScreenDCImpl( wxScreenDC *owner ) :
|
||||
wxMSWDCImpl( owner )
|
||||
{
|
||||
@@ -37,3 +37,11 @@ wxScreenDCImpl::wxScreenDCImpl( wxScreenDC *owner ) :
|
||||
::SetBkMode( GetHdc(), TRANSPARENT );
|
||||
}
|
||||
|
||||
// Return the size of the whole virtual screen (all monitors)
|
||||
void wxScreenDCImpl::DoGetSize(int *width, int *height) const
|
||||
{
|
||||
if ( width )
|
||||
*width = ::GetSystemMetrics(SM_CXVIRTUALSCREEN);
|
||||
if ( height )
|
||||
*height = ::GetSystemMetrics(SM_CYVIRTUALSCREEN);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user