C language function:GetDC sample codes

Search sample code in the internet.It is the result.


TITLE : CreateCompatibleBitmap & CreateCompatibleDC
HDC hDC = GetDC( NULL );.......
http://cboard.cprogramming.com/windows-programming/43686-createcompatiblebitmap-createcompatibledc.html


TITLE : CreateCompatibleBitmap & CreateCompatibleDC
HDC hDC = GetDC( g_hWnd );.......
http://cboard.cprogramming.com/windows-programming/43686-createcompatiblebitmap-createcompatibledc.html
TITLE : CreateCompatibleBitmap & CreateCompatibleDC
I didn't see that you were using GetDC( 0 ) in your first post. That would retrieve the DC for the desktop which is probably not what you intended. So the only difference with your new code is that you use your windows hwnd. That's what I thought you did when I responded first........
http://cboard.cprogramming.com/windows-programming/43686-createcompatiblebitmap-createcompatibledc.html
TITLE : CreateCompatibleBitmap & CreateCompatibleDC
don't forget to ReleaseDC() the one you GetDC() 'ed........
http://cboard.cprogramming.com/windows-programming/43686-createcompatiblebitmap-createcompatibledc.html
TITLE : デバイスコンテキスト| GetDC GetWindowDC CreateCompatibleDC ReleaseDC DeleteDC
hdc = GetDC(hwnd).......
http://cgi.geocities.jp/excelgame/api/DC.php
search Google

https://www.google.com/#q=GetDC