Debug Assertion Error

I have a program with a property sheet in a dialog box as descirbed in the source code section of property sheets. Anyway, on my computer, the program runs fine. I sent it to my friend however, and he gets a Debug Assertion Error that says something like "error in file dlgprop.cpp line 238." I searched my computer and found that file outside of my workspace folder but I didn't see anything strange. I also have no way of testing the error because I don't get it on my computer.

The error isn't a huge problem because if my friend hits the ignore button twice, the error message disappears and the program works. The computer my friend is using is Windows 98, just like mine so I don't understand. Does anyone have any suggestions to get rid of the error?
[794 byte] By [pr_101] at [2007-11-16 1:24:06]
# 1 Re: Debug Assertion Error
The version he has is probably older than yours, I've seen the same thing with older version of "Mfc42.dll". No big deal.

Roger L. McElfresh
herbieII at 2007-11-10 4:16:31 >
# 2 Re: Debug Assertion Error
He doesn't have C++. I've just sent him the executable file so he could run the program and the three required dll's. Is there any other file he needs to get rid of the error or is there anything else I can do?
pr_101 at 2007-11-10 4:17:36 >
# 3 Re: Debug Assertion Error
What is dlgprog.cpp? I can't find it in my system. Is it maybe a file your program depends on?

Roger L. McElfresh
herbieII at 2007-11-10 4:18:35 >
# 4 Re: Debug Assertion Error
First, why did you send your friend a copy of the debug version of the program? You should have sent the release version where the ASSERT macro doesn't occur.

I looked at DLGPROP.CPP line 238. Did you read the comments? Here they are:

" // WINBUG: Windows currently does not support DIALOGEX resources!
// Assert that the template is *not* a DIALOGEX template.
// DIALOGEX templates are not supported by the PropertySheet API.

// To change a DIALOGEX template back to a DIALOG template,
// remove the following:
// 1. Extended styles on the dialog
// 2. Help IDs on any control in the dialog
// 3. Control IDs that are DWORDs
// 4. Weight, italic, or charset attributes on the dialog's font
"

Did you check for this?

Also, why not statically link the application with MFC, send the release version, and see if the problem clears up. If you statically link MFC, there is no need to send anything except the EXE. You don't need any of the other DLLs.

Regards,

Paul McKenzie
Paul McKenzie at 2007-11-10 4:19:40 >
# 5 Re: Debug Assertion Error
Thanks for your help but I have no idea how to do the release version thing. Can you please tell me where to get the release version(what folder is it in, or do I have to create a release version) and also how do I make it so I don't need the dll's like you described? Please help me, I'm not that knowledgeable. Thanks, Jason
pr_101 at 2007-11-10 4:20:42 >
# 6 Re: Debug Assertion Error
Also, how do I statically link the application with MFC?
pr_101 at 2007-11-10 4:21:41 >
# 7 Re: Debug Assertion Error
To create a statically linked EXE, you have to go to Project | Settings. At the top left corner the property sheet, you will see a combo box that says "Settings For:". Choose "All Configurations". Now select the "General" tab. You should see a combo box with "Microsoft Foundation Classes". Select "Use MFC in a static DLL". This will statically link MFC in your release and debug versions.

To build a release version, all you have to do is from the main menu select "Build | Set Active Configuration...", and select "Win32 Release" from the dialog box. When you build the app, the executable is placed in the "\Release" subdirectory. Whenever you want to go back to the debug build, you just select "Build | Set Active Configuration..." and choose "Win32 Debug".

Beware that the release version will reveal any hidden bugs that your app may have. Uninitialized pointers are the main concern when you build and run a release version as opposed to a debug version.

Good Luck.

Regards,

Paul McKenzie
Paul McKenzie at 2007-11-10 4:22:34 >