Subj : Main Menu failure in Win98 To : borland.public.cpp.borlandcpp From : "BH" Date : Mon Aug 25 2003 04:16 pm Hi All....peculiar problem here. We've created the main menu ( and associated submenus ) for our BC++5.02 MDI app for years using a predefined menu resource in an *.rc file, plus code like the following... the resulting main menu and "submenus" work well under WinXP and Win98: //===== main menu built from resource file ===== // inside InitMainWindow().... TMDIClient *mainClient = new ourAppMDIClient; TDecoratedMDIFrame * mainFrame = new TDecoratedMDIFrame(Name, OUR_MDI_MENU, *mainClient, true); //===== Lately, we're attempting to build the main menu (and associated submenus) from text in a database, so we're adding all menu items in code and handing the main menu over to the app's main frame, like this: //===== main menu built from database records ===== //inside InitMainWindow().... TMDIClient *appMainClient = new ourAppMDIClient; TDecoratedMDIFrame * appMainFrame = new TDecoratedMDIFrame(Name, 0, *mainClient, true); // no menu resource specified //later ...after user login, create user-specific main menu TMenu * mainMenu = new TMenu(); // not shown: //add main menu items using mainMenu->AppendMenu TFrameWindow * frameWin = GetApplication()->GetMainWindow(); frameWin->SetMenu(mainMenu->GetHandle()); //===== The second way ( building main menu in code using text from database ) works *GREAT* under winXP but fails under win98 as follows: All main menu items appear fine, but drop down submenus (i.e. main menu popups) do not appear when main menu items are clicked. After clicking a few main menu items in vain, the app bombs with an illegal operation/GPF in module User.exe (a windows file). This failure has happened on multiple win98 machines, yet the same app under WinXP works fine..no problems with menus at all. We're stumped....any ideas?? Thanks in advance, BH .