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
Solved

Bitmaps from resources won't show

Posted on 1997-07-29
4
235 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
  • 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: 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
sumNumber challenge 16 139
maven archtype selection in eclipse 1 57
child constructor and parent constructor, overriding and overloading 6 88
Problem to event 3 102
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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…

839 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