Displaying a picture (bitmap) using VC++(MFC)

   I want to display a bitmap using the filename not the resource ID.
Plz help me to display any picture using picture file name.
thanx.
mon2000Asked:
Who is Participating?
 
Roshan DavisConnect With a Mentor Commented:
    HBITMAP hBMP = (HBITMAP)LoadImage(AfxGetInstanceHandle(),
                                       "Bitmap FilePathName",
                                       IMAGE_BITMAP,
                                       0,
                                       0,
                                       LR_LOADFROMFILE);

set this hBMP to your control

GOOD LUCK
0
 
chensuCommented:
Check out my article at CodeGuru.

An Image (GIF, JPEG, BMP, ICO, WMF and EMF) Viewer
http://www.codeguru.com/multimedia/ImgViewer.shtml
0
 
mon2000Author Commented:
many thanx roshmon for you help.
Iwant to ask you about the install shield. when I try to install it it gives me error-132 do u have a solution for this problem.
thanx again Roshmon.
0
 
Roshan DavisCommented:
Sorry

I don't have install sheild....

Roshmon
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.