Click here to Skip to main content
15,920,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
General3thing killing me Pin
ANDYFA24-Jul-04 3:15
ANDYFA24-Jul-04 3:15 
GeneralRe: 3thing killing me Pin
Ivan Cachicatari25-Jul-04 12:16
Ivan Cachicatari25-Jul-04 12:16 
GeneralRetrieving ODBC DSN information without creating an ODBC Connection Pin
slacker24-Jul-04 3:14
slacker24-Jul-04 3:14 
Generalhiding hard drive Pin
Perestroyka24-Jul-04 1:37
Perestroyka24-Jul-04 1:37 
GeneralAboutBox Assertion Pin
Grahamfff23-Jul-04 22:03
Grahamfff23-Jul-04 22:03 
GeneralRe: AboutBox Assertion Pin
Johan Rosengren23-Jul-04 23:01
Johan Rosengren23-Jul-04 23:01 
GeneralRe: AboutBox Assertion Pin
Grahamfff24-Jul-04 9:44
Grahamfff24-Jul-04 9:44 
GeneralRe: AboutBox Assertion Pin
Johan Rosengren24-Jul-04 20:15
Johan Rosengren24-Jul-04 20:15 
The lines:

// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);


means just what the comment says, IDM_ABOUTBOX mst be in a special range. ASSERT breaks if an expression returns FALSE, that is ASSERT( FALSE ) will always break. The expression in the ASSERT in the first line above will return TRUE if the bit mask 0xFFF0 is set. 0xFFF0 & 0x10 equals 0x10, so using this value, the first ASSERT will not trigger.

The second line just checks for the value being smaller than 0xF000. Of course, 0x10 returns TRUE in this case.

So, if you have given 0x10 as the value, and one of the ASSERTs triggers, the value is obviously not the one you have defined. It's easy to check what it really is, by for example including the line

int test = IDM_ABOUTBOX;


in InitInstance of the application class and setting a breakpoint on the line below. Run, and check the value of test in the watch window.

Now, you are stating that the error is an unhandled exception rather than an ASSERT - we have a quickly moving target here, obviously.

For stuff like this, you might want to check the call stack backwards to the first line of code that lies in your application rather than MFC or Windows. You might also want to check all ASSERTs that was triggered before the exception.
GeneralRe: AboutBox Assertion Pin
Grahamfff24-Jul-04 10:51
Grahamfff24-Jul-04 10:51 
GeneralNot receiving NM_CUSTOMDRAW messasges Pin
Mike Landis23-Jul-04 21:02
Mike Landis23-Jul-04 21:02 
GeneralRe: Not receiving NM_CUSTOMDRAW messasges Pin
includeh1024-Jul-04 2:27
includeh1024-Jul-04 2:27 
GeneralRe: Not receiving NM_CUSTOMDRAW messasges Pin
Mike Landis24-Jul-04 10:00
Mike Landis24-Jul-04 10:00 
GeneralRe: Not receiving NM_CUSTOMDRAW messasges Pin
Karthik TL29-Mar-12 19:47
professionalKarthik TL29-Mar-12 19:47 
QuestionHow to call MFC DLL in installShield 6.x Pin
Sumit Kapoor23-Jul-04 20:04
Sumit Kapoor23-Jul-04 20:04 
AnswerRe: How to call MFC DLL in installShield 6.x Pin
Johan Rosengren23-Jul-04 23:10
Johan Rosengren23-Jul-04 23:10 
GeneralChanging the volume of my App only. Pin
Hesham Amin23-Jul-04 20:02
Hesham Amin23-Jul-04 20:02 
GeneralWaveOut Problems in Windows application Pin
Fantmx23-Jul-04 18:48
Fantmx23-Jul-04 18:48 
GeneralGame Scripting... Pin
mztrjimmy23-Jul-04 16:10
mztrjimmy23-Jul-04 16:10 
GeneralRe: Game Scripting... Pin
Michael Dunn24-Jul-04 11:45
sitebuilderMichael Dunn24-Jul-04 11:45 
GeneralRe: Game Scripting... Pin
mztrjimmy25-Jul-04 10:36
mztrjimmy25-Jul-04 10:36 
GeneralRe: Game Scripting... Pin
Michael Dunn25-Jul-04 18:35
sitebuilderMichael Dunn25-Jul-04 18:35 
GeneralRe: Game Scripting... Pin
mztrjimmy25-Jul-04 18:49
mztrjimmy25-Jul-04 18:49 
Generalabout creating a dll in the project of win32 Pin
yingkou23-Jul-04 15:59
yingkou23-Jul-04 15:59 
GeneralRe: about creating a dll in the project of win32 Pin
Chris Losinger25-Jul-04 4:23
professionalChris Losinger25-Jul-04 4:23 
GeneralRe: about creating a dll in the project of win32 Pin
yingkou25-Jul-04 13:54
yingkou25-Jul-04 13:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.