Help! How can I draw a bitmap only with BITMAP information!

X

xqggz

HI everyone,
Now I have only the information of the BITMAP , but not an actual
bitmap. I want to draw the bitmap according the BITMAP struction
information, what can I do? I use the VC2005 Express and I am not
familliar with the SDK function? I searched on the web site and got an
example as following, but it need load an actual bitmap resource. Now
I have only the bm:
case WM_PAINT:
{
BITMAP bm;
PAINTSTRUCT ps;

HDC hdc = BeginPaint(hwnd, &ps);

HDC hdcMem = CreateCompatibleDC(hdc);
HBITMAP hbmOld = SelectObject(hdcMem, g_hbmBall);

GetObject(g_hbmBall, sizeof(bm), &bm);

BitBlt(hdc, 0, 0, bm.bmWidth, bm.bmHeight, hdcMem, 0, 0,
SRCCOPY);

SelectObject(hdcMem, hbmOld);
DeleteDC(hdcMem);

EndPaint(hwnd, &ps);
}
break;
Could anybody help me??? Thanks!!!
 
V

Victor Bazarov

xqggz said:
Now I have only the information of the BITMAP , but not an actual
bitmap. I want to draw the bitmap according the BITMAP struction
information, what can I do? [..]

This is not a C++ language question. Please ask in the newsgroup
dedicated to MS Windows programming. See FAQ for the list of the
suggested newsgroups.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top