6f5 Subj : Menu not assigned To : borland.public.cpp.borlandcpp From : Stefan Schumann Date : Thu Apr 01 2004 10:05 am Hi! I have got a problem which I cannot solve. I try to assign a menu to a window, it compiles, it runs but the menu is not assigned. The program is a derivation of the bmpview project in the examples. My braindraw.cpp contains this static const char AppName[] = "BrainDraw"; //Name Definition //class implementation class _USERCLASS TBrainDrawWindow : virtual public TWindow, public TClipboardViewer { .... DECLARE_RESPONSE_TABLE(TBrainDrawWindow); }; //Response Table DEFINE_RESPONSE_TABLE2(TBrainDrawWindow, TClipboardViewer, TWindow) EV_COMMAND(CM_NEWCONTOUR, CmNewContour), .... END_RESPONSE_TABLE; // class TBrainDrawApp class _USERCLASS TBrainDrawApp : public TApplication { public: TBrainDrawApp(const char far* name) : TApplication(name) {} void InitMainWindow() { TFrameWindow* frame = new TFrameWindow(0, Name, new TBrainDrawWindow); frame->AssignMenu(Name); frame->SetIcon(this, Name); frame->Attr.AccelTable = IDA_BMPVIEW; SetMainWindow(frame); } }; int OwlMain(int /*argc*/, char* /*argv*/ []) { return TBrainDrawApp(AppName).Run(); } My braindraw.rc file contains this: #include #include #ifndef WORKSHOP_INVOKED #include #endif #include "braindraw.h" //contains the definitions of CM_WHATEVER BRAINDRAW MENU { POPUP "&File" { MENUITEM "&Open Bitmap...\tCtrl+O", CM_OPENBITMAP .... } .... } Why is the menu not assigned to my window? Thanks in advance, Stefan . 0