Solved

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

Posted on 2002-03-23
4
408 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Show shut-down message as Windows 8 shuts down. 9 99
Expand data scrubbing tool 13 35
iSeries DB2 Query 2 97
Use of condition with 'serial' in ansible 2 71
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa‚Ķ
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.

860 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