Tuesday, January 19, 2016

This is how WM5 use BitBlt?




            


this.Focus ();
this.Capture = true;
IntPtr m_hWnd = Win32.GetFocus ();
this.Capture = false;

IntPtr m_hBitmap = LoadBitmapFromFilename (. M_hWnd, Path.GetDirectoryName (Assembly.GetExecutingAssembly () GetModules () [0] .FullyQualifiedName) + "\\ Map \\ x.jpg");

IntPtr hdc = Win32.GetDC (m_hWnd);
IntPtr hMemDC = Win32.CreateCompatibleDC (hdc);
IntPtr hOld = Win32.SelectObject (hMemDC, m_hBitmap);

Win32.BitBlt (hdc, 0, 0, 200, 200, hMemDC, 0, 0, Win32.ERop.SRCCOPY);

Win32.DeleteDC (hMemDC);
Win32.SelectObject (hMemDC, hOld);
Win32.ReleaseDC (m_hWnd, hdc);

Do not do that.
Reply:
Read to m_hBitmap to 0
Reply:
Debugging at
ps: happy new year

No comments:

Post a Comment