Solved

Why are bitmaps displayed in a debug version of a program but not in the release?

Posted on 2000-04-20
11
171 Views
Last Modified: 2013-11-20
Why are bitmaps displayed in a debug version of a program but not in the release?

1. I have an Active X control.
2. It uses AFX_MANAGE_STATE to get hold of the bitmaps from its own resource.
3. The bitmaps are loaded into an image list and displayed in a CListCtrl.
4. The bitmaps are displayed in the debug version of the program
5. The bitmaps are NOT displayed in the release.

Thanks in advance
Yakky
0
Comment
Question by:yakky
[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
  • 4
  • 3
  • 2
  • +2
11 Comments
 
LVL 5

Expert Comment

by:Wyn
ID: 2735074
Too high level
0
 
LVL 4

Expert Comment

by:inpras
ID: 2735180
We appreciate some code here....!!!
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 2735428
without source we can only guess - however here as a suggestion

Unintialized variables - debug has a habit of initializing variables to 0 - however in release theses variables could have any value. Make sure all your variables have the values set to what you want them to be don't assume the compiler will.
0
Industry Leaders: 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!

 
LVL 11

Expert Comment

by:mikeblas
ID: 2736972
>  debug has a habit of initializing variables to 0

No, it doesn't.  An uninitialized variable is an unintialized variable. If you find one that has any particular value more often than another, you're just lucky.

(Unless you're using the /GZ compiler switch.)

..B ekiM
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 2737225
> (Unless you're using the /GZ compiler switch.)

oops I did mean 0xCC which I think is the /GZ option (standard company option for debug here)

must remember not to rush posts b4 going home :)

0
 

Author Comment

by:yakky
ID: 2751364
Ive got the bitmaps to display, I simply removed the ASSERT statement.
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 2751392
ahh - did you by any chance have useful code in the assert?
0
 
LVL 11

Expert Comment

by:mikeblas
ID: 2752020
> I simply removed the ASSERT statement

What ASSERT statement? You haven't mentioned any ASSERT statements until now.

..B ekiM
0
 

Author Comment

by:yakky
ID: 2752127
The ASSERT was on the CImageList Create function. Prety dumb really. Thanks for everyones help. By the way why did it work in the Debug and not in the Release?

Yakky
0
 
LVL 9

Accepted Solution

by:
ShaunWilde earned 50 total points
ID: 2752228
in release ASSERT is define as

#define ASSERT(f)          ((void)0)

which means that 'f' never gets executed

you should have used VERIFY instead which works the same as ASSERT in debug but in release it is defined as

#define VERIFY(f)          ((void)(f))

so 'f' does get executed

PS now you know why we wanted to see the code as this wuld have been spotted straight away (I hope) as it is a common gotcha (sic)
0
 

Author Comment

by:yakky
ID: 2754480
Thanks for everyones help
Yakky
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
Smart Camera scanning and reading information 3 126
bigDiff challenge 17 144
NotAlone Challenge 20 93
Path of Workbook 3 87
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

738 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