Thread: win32 api
View Single Post
Old Mar 10th, 2006, 3:56 AM   #6
Mjordan2nd
The Supreme Ruler
 
Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6 Mjordan2nd is on a distinguished road
If you want to do it outside WM_PAINT and not use BeginPaint(), you could use:

hdc=GetDC(hwnd);

When the device context is no longer needed, make sure you call:

ReleaseDC(hwnd, hdc);
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower
Mjordan2nd is offline   Reply With Quote