Obtainig a bitmap handle from its filename

Dear Friends,

  I am developing an application using MFC where on a click of push

button ,a dialog box is popped up which shows the bitmap files in any

directory and on selecting any bitmap file it should load the bitmap

image on the static text control provided on the form view .
    The problem is that i am not able get any function which returns a

handle to the bitmap from its filename so that i can load  the bitmaps


Who is Participating?
MDarlingConnect With a Mentor Commented:
HANDLE LoadImage(
  HINSTANCE hinst,   // handle to instance
  LPCTSTR lpszName,  // name or identifier of the image
  UINT uType,        // image type
  int cxDesired,     // desired width
  int cyDesired,     // desired height
  UINT fuLoad        // load options

This is the function you need.

Check out CodeGuru (www.codeguru.developer.com). They have a function that load a bitmap from a file.
Vinayak KumbarSr Program ManagerCommented:
All Courses

From novice to tech pro — start learning today.