-
August 24th, 2010, 06:49 AM
#1
Getting Control HBitmap
Hello, I'm trying to get HBitmap from Graphics Control handle.
I do it like here:
Code:
var controlGraphics = m_control.CreateGraphics();
var controlHdc = controlGraphics.GetHdc();
var controlHBitmap = PInvoke.GetCurrentObject( controlHdc, PInvoke.OBJ_BITMAP );
I working with Windows 7 and VS2010 (C# .NET 4.0).
I use standard WinAPI functions like u can see.
It's working good in normal situation, but when I set Win 7 system options to "Fit to best performance" (its turning off nice graphics Win 7 effects and set simplest possible themes i think) this method don't work.
Method "GetCurrentObject" return me handle to desktop HBitmap - not to control. It can be fixed in some way, or it smth with system whereof i dont know?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|