Xref: utzoo comp.lang.c++:9439 comp.windows.ms:4992 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!mcsun!inria!jcc From: jcc@adesign.uucp (Jean Christophe) Newsgroups: comp.lang.c++,comp.windows.ms Subject: CommonView Help needed! Keywords: CommonView Menu DeleteItem Message-ID: <670@design.uucp> Date: 7 Sep 90 18:54:37 GMT Organization: Axis Design, 119 rue de Flandre 75019 Paris France Lines: 67 Hello folks, Again my friend badly needs help with CommomView. It *seems* that the function Menu::DeleteItem doesn't work properly. But she suspects that she's doing something wrong... Here is the sympton : class MyWind : public TopAppWindow { Menu menu; Menu menubar; public: MyWind(); virtual void MenuCommand(MenuCommandEvt); }; MyWind::MyWind() { menu.AppendItem(1, "line 1"); menu.AppendItem(2, "line 2"); menubar.AppendItem(&menu, "Menu 1"); ChangeMenu(&menubar); Show(); } void MyWind::far MenuCommand(MenuCommandEvt e) { switch(e.GetItemID()) { case 1: /* This function call fails... And the menu is still there and active */ menubar.DeleteItem(&menu); break; } } Anybody gets an idea why this won't work ? Since the CommonView documentation seems to be a pain, my friend needs some more elaborate examples. More precisely, programs that deal with the classes : ChildAppWindow, Menu, DialogWindow, ListBox... If you have such small examples to share, she would be very gratefull and very relieved. Note : this is done with C++ 1.2 and I suspect the version of CommonView to be somehow out of date... Reply by Email please. Thanx in advance, -- "Jessie" ------------------------------------------------------------------------------ jcc@adesign.uucp | "An artificial intelligence is better than none!" ..!inria!adesign!jcc | "Artificial intelligence matches natural stupidity!" Collet Jean-Christophe | "Objets inanimes avez-vous donc une ame ?" ------------------------------------------------------------------------------ Axis Design | 119, rue de Flandres | 75019 Paris | France | Tel: +33 (1) 40 35 20 20 | ------------------------------------------------------------------------------