By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,510 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,510 IT Pros & Developers. It's quick & easy.

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

P: n/a
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!!!

Jun 19 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
xqggz wrote:
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
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jun 19 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.