CompuServe Thread

Missing Menu!

1 messages in this thread
#30318From: Sumeet ShrivastavaJul 8, 1994 4:03 PM
Hi Ron, The reason why you get an error in debug version and not release version is because the ASSERT macro is defined only under debug build (when _DEBUG is defined). So the problem that you are getting under debug build probably also existed under release build but the assertion never occured. Why the assertion? —————— I am not sure what the error might be. Usually when you get an assertion error, you should take down the file name and the line number where you get the assertion. That helps a lot. I did search through the code and my guess is that you get the assertion in CFrameWnd::OnInitMenuPopup. Somehow, the pointer to the menu is NULL. This does not normally happen unless you are dynamically modifying the menu (by SetMenu() etc.) , or it is a side affect of memory getting corrupted (corrupt pointer etc.). For finding the cause of this error, I would suggest that you take a look at article q108112 for debugging an assertion error. You might also want to run your application with MFC Trace switched on. This can be done by selecting "Enable Tracing" from "MFC Trace Options" icon under Visual C++ program group. Ron, hope this helps. Thanks. Sumeet Shrivastava Microsoft Developer Support