none
CE6.0 Failure Loading Bitmap File RRS feed

  • Question

  • Hi,
    I am using WinCE 6.0 and having trouble loading a bitmap from a file.

    HBITMAP hBitMap;
    hBitMap = SHLoadDIBitmap( _T("\\CFCard\\Icons\\Icon.bmp") );
    DWORD LastError = GetLastError();

    The bmp is not loaded and GetLastError() returns 6 = INVALID_HANDLE.

    I believe the path is correct since if I make it wrong then GetLastError() returns 2.

    I've tried adding SYSGEN_STANDARDSHELL and SYSGEN_SHELL to my OS but still get the same invalid handle.

    Thanks for the help.


    Monday, June 10, 2013 4:00 PM

Answers

  • Turns out the handle returned is valid and can be used, even though GetLastError() indicates that the handle is invalid.   Neither SYSGEN_STANDARDSHELL or SYSGEN_SHELL were required in the OS.

    • Marked as answer by rletizia Thursday, June 13, 2013 1:26 PM
    Thursday, June 13, 2013 1:26 PM