![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Apr 2005
Posts: 6
Rep Power: 0
![]() |
Visual C++ Form Project - need to get HDC for drawing bitmaps
Hi all
I am fairly new to C++, and am having problems creating a quick GUI application using the Win32 API. I'd like to use the "windows form project" option in Visual C++ ...which creates windows, textboxes, buttons etc. through a drag & drop interface. The problem is that I need to able to create a GUI with controls for user input, but also draw bitmaps on a large area of the window. In order to do this, I need to access the handle to the device context of the (automatically created) window. How do I get the handle to the device context, for my bitmap-drawing functions? And will I get the HDC out of the actual frame, or a specific picture box? ... Any help would be much appreciated. |
|
|
|
|
|
#2 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
There are 2 ways to do that, one using the beginPaint() function, the other is with the GetDC() function.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|