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!!!
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!!!