Jason Hsu
May 11th, 1999, 08:07 PM
Hi.
I have a problem with now,
that is when I read a bitmap file("24bit or 256 colors") and plan to put it to a memory DC. But I have found if the bitmap width or height too large will can't create the bitmap for the memory DC. (I using the "CreateCompatiblebitmap" ) and if the bitmap not too large will be able to create OK. so can someone kindness to help me.
follows are my wrote :
============================================================
HDC Parent_DC=GetDC(My_hwnd);
HDC Memory_DC=CreateCompatibleDC(Parent_DC);
HBITMAP hBmp= CreateCompatibleBitmap(Parent_DC,Bitmap_Width,Bitmap_Height);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
!! Right here !! if the bitmap too large will return Fails.
HBITMAP oldHbmp=SelectObject(Memory_DC,hBmp);
==============================================================
Thanks in advance..
Jason Hsu
JasonHsu@indeed.com.tw
I have a problem with now,
that is when I read a bitmap file("24bit or 256 colors") and plan to put it to a memory DC. But I have found if the bitmap width or height too large will can't create the bitmap for the memory DC. (I using the "CreateCompatiblebitmap" ) and if the bitmap not too large will be able to create OK. so can someone kindness to help me.
follows are my wrote :
============================================================
HDC Parent_DC=GetDC(My_hwnd);
HDC Memory_DC=CreateCompatibleDC(Parent_DC);
HBITMAP hBmp= CreateCompatibleBitmap(Parent_DC,Bitmap_Width,Bitmap_Height);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
!! Right here !! if the bitmap too large will return Fails.
HBITMAP oldHbmp=SelectObject(Memory_DC,hBmp);
==============================================================
Thanks in advance..
Jason Hsu
JasonHsu@indeed.com.tw