Solved

Bitmaps from resources won't show

Posted on 1997-07-29
4
240 Views
Last Modified: 2013-12-03
Hi

I have a dialog that has a CStatic bitmap control and I need to load one of four bitmaps to the control run-time.

I have tried to do it with CBitmap objects and CStatic::SetBitmap commands, but the bitmap would just not show. The bitmaps are 50 x 20 x 16 colors.
The dialog class has member variables for the four bitmaps and the CStatic control and I used DDX.

I am using MS VC++ 4.2 on NT 3.51 and the dialogs are created with Resource editor+ClassWizard

Any suggestions?
0
Comment
Question by:vake
[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 4

Accepted Solution

by:
AVaulin earned 100 total points
ID: 1302913
Be sure that you use SS_BITMAP style ie you have to add Picture control to dialog and set Bitmap type in general control properties. Also you can create this control dynamicaly at run time with CStatic::Create method (be sure to use SS_BITAMP style).
Good luck.
0
 

Author Comment

by:vake
ID: 1302914
The control is SS_BITMAP, the problem is that according to the MFC help, I have used the proper procedure. Of course I do not use any fancy BitBlt operations, just because I think I do not need to (no 256 or special palettes).
I had the same trouble with AVI animations, if I loaded them from a file they worked fine, but if I loaded them from a resource they would not work. The CAnimateCtrl::Open succeeded, but Play did not show anything...
0
 

Author Comment

by:vake
ID: 1302915
The control is SS_BITMAP, the problem is that according to the MFC help, I have used the proper procedure. Of course I do not use any fancy BitBlt operations, just because I think I do not need to (no 256 or special palettes).
I had the same trouble with AVI animations, if I loaded them from a file they worked fine, but if I loaded them from a resource they would not work. The CAnimateCtrl::Open succeeded, but Play did not show anything...
0
 

Expert Comment

by:quosta
ID: 1302916
I wish I had the answer to this one too.  I'm trying to create a bitmap/static control.  From what I've read, it should read from file and display. But, it doesn't.  If you get the answer to this one, please let me know.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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
bigDiff challenge 17 144
pre4 challenge 19 116
child constructor and parent constructor, overriding and overloading 6 95
Numbers in fonts funny displayed... 11 51
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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Suggested Courses

751 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