|
-
May 11th, 1999, 08:07 PM
#1
Help!! How to CreateCompatibleBitmap for a Large Bitmap file(24bits or 256colors)!!!
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
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|