Solved

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

Posted on 2002-03-23
4
382 Views
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.
thanx.
0
Comment
Question by:mon2000
  • 2
4 Comments
 
LVL 23

Accepted Solution

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

set this hBMP to your control

GOOD LUCK
0
 
LVL 23

Expert Comment

by:chensu
ID: 6892403
Check out my article at CodeGuru.

An Image (GIF, JPEG, BMP, ICO, WMF and EMF) Viewer
http://www.codeguru.com/multimedia/ImgViewer.shtml
0
 

Author Comment

by:mon2000
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.
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 6898929
Sorry

I don't have install sheild....

Roshmon
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now