Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VC6++ resource editor

Status
Not open for further replies.

Zech

Programmer
Oct 14, 2002
116
0
0
US
Hi,

I have a problem with my VC6++ resource editor and I can't find the solution in the manuals.

Whenever I design a dialog box in the VC6++ IDE resource editor with a picture resource (a bitmap) on it, the picture always doesn't come out properly in the compiled program. The picture shows up alright in the resource editor, but not after it is compiled and built.

I wonder whether anybody could help me solving this problem. Thank you.
 
Do you use a picture control, with a bitmap resource?
Check the properties of the picture control, if it is visible and its type is "Bitmap".
 
Yes, I used the picture control with a bitmap resource.

I did check its properties for visibility option and set the type to "bitmap". The bitmap appears alright in the resource editor but it disappears after it is compiled and built. Do you think that I may be missing something here?

Here are the steps that I used to build the dialog box:

1. I imported the bitmap into the project.
2. I made sure that the bitmap is properly added by checking resource.h
3. I designed the dialog box and added the bitmap into the dialog box (the bitmap shows up in the editor) - using the picture control of the resource editor.
4. I added the code to display the dialog box

The dialog box shows up alright when the program is executed but without the bitmap.

I wonder whether I am missing something here. I don't think that I need to add additional codes to display the bitmap on the dialog box, do I?

Additionally, I also used the same bitmap resource in the main window (displaying it in the main window via BiBlt function) & it shows up alright in the main window. Do you think that sharing resources may be the problem?

Thanks! :)
 
No, the shared resource cannot be the problem.
Maybe if in the resource.h there is something else declared with the same ID...I don't know.
Is your app multithreaded? How do you display the dialog box(modal or not)?
 
No, it's not multi-threaded and the dialog box is modal.

I don't think that there is any problem with the resource ID in the resource.h because the bitmap shows up alright in the main window. However, I'll look into the resource.h and the .rc file again and I'll let you know if I find the error.

Meanwhile, thank you for helping me out and please let me know if you have any idea that may solve the problem.

Thanks :)

Zech
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top