quinlan
asked on
GDI failure/SelectObject problem
I have a problem with the win32 OWL app that I am writting.
When Codeguard is turned on, I get an error whenever I call the SelectObject parameter of a TDC.
Without Codeguard, I occassionally get program crashes and occassionally SaveDC returns 0. The crashes are always GDI failures.
I have a lot of (sometimes nested) code that looks something like this:
dc.SaveDC( );
dc.SelectObject( GetTitleFont( ) );
...
dc.RestoreFont( );
dc.RestoreDC( );
Any ideas?
When Codeguard is turned on, I get an error whenever I call the SelectObject parameter of a TDC.
Without Codeguard, I occassionally get program crashes and occassionally SaveDC returns 0. The crashes are always GDI failures.
I have a lot of (sometimes nested) code that looks something like this:
dc.SaveDC( );
dc.SelectObject( GetTitleFont( ) );
...
dc.RestoreFont( );
dc.RestoreDC( );
Any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER