mesman00
What's that...?
ok i keep posting simple problems here, so i probably sound liek a total noob. but i don't care. i have created a menu using msvc++ resource creator tool. here the actual code generated by msvc++
notice the menu specific code under heading IDR_MENU1. so, when i create the window i use the following method.
this should work, and i see no reason why it doesn't, but i get an assertion error right when the program loads. and the assertion is definately caused when i try to add the menu to the create method. if i don't add the menu the program executes fine. otherwise i don't even get to see the window. here is a pic of the error:
Code:
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
IDR_MENU1 MENU
BEGIN
POPUP "&File"
BEGIN
MENUITEM "E&xit", IDM_FileExit
END
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
notice the menu specific code under heading IDR_MENU1. so, when i create the window i use the following method.
Code:
Create(NULL, "DICOM SR Viewer", WS_OVERLAPPEDWINDOW, CRect(0, 0, 800, 600), NULL, "IDR_MENU1");
this should work, and i see no reason why it doesn't, but i get an assertion error right when the program loads. and the assertion is definately caused when i try to add the menu to the create method. if i don't add the menu the program executes fine. otherwise i don't even get to see the window. here is a pic of the error:
Last edited: