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

Posted on 2002-03-23
Last Modified: 2013-11-20
   I want to display a bitmap using the filename not the resource ID.
Plz help me to display any picture using picture file name.
Question by:mon2000
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 23

Accepted Solution

Roshan Davis earned 50 total points
ID: 6890683
    HBITMAP hBMP = (HBITMAP)LoadImage(AfxGetInstanceHandle(),
                                       "Bitmap FilePathName",

set this hBMP to your control

LVL 23

Expert Comment

ID: 6892403
Check out my article at CodeGuru.

An Image (GIF, JPEG, BMP, ICO, WMF and EMF) Viewer

Author Comment

ID: 6898922
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.
LVL 23

Expert Comment

by:Roshan Davis
ID: 6898929

I don't have install sheild....


Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Error on moodle after upgrade 3 149
lucky13 challenge 11 158
sum28 challenge 31 117
FizzBuzz challenge 9 85
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit If you want to manage em…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question