This topic is now archived and is closed to further replies.

Painting in Dialog Window?

This topic is 5779 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, How do I BitBlt a bitmap into the client area of a Dialog Window? To BitBlt something into the main window I use this piece of code:

HDC hdc, memdc;
hdc = BeginPaint(hwnd, &paintstruct); // 

memdc = CreateCompatibleDC(hdc);
SelectObject(memdc, hbit);
vRenderWhatever(hdc, memdc); // To display DC from bitmap DC

EndPaint(hwnd, &paintstruct);
Let''s say that I want to blit to a dialog window instead in a similar way, how would I do that? Any special procedures or I just get a handle to the Dialog window, and do my rendering from there? What about the client area? I am a bit confused here, so all help is much appreaciated. What I am doing is a tilebased game, and I have a dialog box for selecting what level to play, and I want to preview a small level map there, hence blitting a small level map to the dialog window. Do I need to set up a particular area of the dialog window for holding the bitmap, or I am free to Blt wherever I want? Thanks for the help!!! No MFC as you can see...

Share this post

Link to post
Share on other sites