wxScreenDCImpl::wxScreenDCImpl( wxDC *owner ) :
wxWindowDCImpl( owner )
{
+ CGRect cgbounds ;
+ cgbounds = CGDisplayBounds(CGMainDisplayID());
+ m_width = (wxCoord)cgbounds.size.width;
+ m_height = (wxCoord)cgbounds.size.height;
#if wxOSX_USE_COCOA_OR_IPHONE
SetGraphicsContext( wxGraphicsContext::Create() );
- m_ok = true ;
#else
- CGRect cgbounds ;
- cgbounds = CGDisplayBounds(CGMainDisplayID());
Rect bounds;
bounds.top = (short)cgbounds.origin.y;
bounds.left = (short)cgbounds.origin.x;
CreateNewWindow( kOverlayWindowClass, overlayAttributes, &bounds, (WindowRef*) &m_overlayWindow );
ShowWindow((WindowRef)m_overlayWindow);
SetGraphicsContext( wxGraphicsContext::CreateFromNativeWindow( m_overlayWindow ) );
- m_width = (wxCoord)cgbounds.size.width;
- m_height = (wxCoord)cgbounds.size.height;
- m_ok = true ;
#endif
+ m_ok = true ;
}
wxScreenDCImpl::~wxScreenDCImpl()