large bitmap file

This is a discussion on large bitmap file within the Windows Programming forums, part of the Platform Specific Boards category; Hey friends i am trying to display a large bitmap file using following code sigment. hdcroi = GetDC(hwnd1); hBaseBitmap = ...

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    5

    large bitmap file

    Hey friends

    i am trying to display a large bitmap file using following code sigment.


    hdcroi = GetDC(hwnd1);
    hBaseBitmap = CreateDIBitmap(hdcroi, (LPBITMAPINFOHEADER) &pBmpInfor->bmiHeader,
    CBM_INIT, pBits, (LPBITMAPINFO) pBmpInfor, DIB_RGB_COLORS );

    if the file is large , then handle to bitmap returned is NULL. How can i get a handle of large bitmaps.

    Kindly help. thankx .

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    I'd need to see a slightly better example than this but as far as I can see if you get a NULL return then there is a good reason. Perhaps not enough memory is available. How big of an image are we talking about here?

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    5

    large image

    hey friend

    i am trying to load 50 MB JPEG

    thankx

  4. #4
    Registered User
    Join Date
    Feb 2002
    Posts
    329
    From MSDN:

    If the function fails, the return value is NULL.
    Windows NT: To get extended error information, call GetLastError.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 12:44 PM
  2. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. Replies: 3
    Last Post: 03-04-2005, 01:46 PM
  5. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 09:46 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21