Solved

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

Posted on 2002-03-23
4
419 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
[X]
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
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand to include initial dialog with two choices. 9 94
how to monitor remote shell execution on linux 9 113
dog bark java program 15 130
scoreUp challenge 14 74
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: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.

732 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