none
MFC LoadBitmap Not in 3.00 format

    Question

  • I am trying to show an image in my MFC dialog's Picture Control. 

    I tried bitMap.LoadBitmap (ID_IMAGE);

    but got an error saying the corresponding image is not 3.00 format. I used a jpg image for this.
    What do I have to do to use my image in the dialog?

    Thank you,

    Makoto

    Saturday, June 09, 2012 4:40 AM

Answers

  • Use a *.bmp file. You can use the Windows PAINT program to create one, or some other third party photo imaging software.
    Sunday, June 10, 2012 12:31 AM
  • Thank you.  I saved my .ico image as .bmp. Now I was able to compile and build to program.

    When I ran and displayed the dialog, I did see the image - just a bit faint...

    I will play with my OnPaint code.

    Thank you very much.

    Makoto


    • Edited by mh1000 Sunday, June 10, 2012 3:17 AM
    • Marked as answer by mh1000 Sunday, June 10, 2012 3:17 AM
    Sunday, June 10, 2012 3:01 AM

All replies

  • Loadbitmap is not able to handle JPG images.

    You must use 3rd party / self written code to handle JPG images or you can use i.e. GDI+.

    Here an sample in CodeProject:

    http://www.codeproject.com/Articles/3537/Loading-JPG-PNG-resources-using-GDI

    Saturday, June 09, 2012 9:51 AM
  • Thank you for the information. I will study it.

    In the meantime, I tried with xxx.ico image, and got the same compile error - not 3.00 format.

    Just for a test, is there any way I can just create a test "3.00 format" image? Or any test image that LoadBitmap() will accept?

    Makoto

    Saturday, June 09, 2012 11:05 PM
  • Use a *.bmp file. You can use the Windows PAINT program to create one, or some other third party photo imaging software.
    Sunday, June 10, 2012 12:31 AM
  • Thank you.  I saved my .ico image as .bmp. Now I was able to compile and build to program.

    When I ran and displayed the dialog, I did see the image - just a bit faint...

    I will play with my OnPaint code.

    Thank you very much.

    Makoto


    • Edited by mh1000 Sunday, June 10, 2012 3:17 AM
    • Marked as answer by mh1000 Sunday, June 10, 2012 3:17 AM
    Sunday, June 10, 2012 3:01 AM