depending on what your wanting to do using the existing menu may indeed be the easiest method. however if for example you wish to alter the menu using ownerdraw it may be faster to simply create your own menu. Note however that the SetMenu api replaces the windows menu but does not destroy the old menu. An application should retrieve the old menu using GetMenu then call DestroyMenu on that handle. this will prevent memory leaks. I dont think that SetMenu will automatically set the new window menu in the new menubar. the window menu is the menubar item that houses the list of currently opened mdi windows (note that unless a particular window is made to open on the desktop it will be an MDI window and is a child of the MDI client window NOT the mirc main window). I think you will be required to send the WM_MDISETMENU message anyway (unless you dont plan on allowing the display of mdi windows). This message is not sent to the frame window (the mWnd in a dll call) but instead is sent to the mdi window. Alternatively this message can also replace the whole menubar as well. Using this message the application MUST call the DrawMenuBar function to disply the new changes. The menu is part of the non-client area of the window and is not subject to change with WM_PAINT or WM_ERASEBKGND. as far as i know WM_NCPAINT wont redraw the menu either so an explicit call is a must. as for preventing the WM_DESTROY message from being sent i dont see how using the original menu's handle prevents this. in fact im sure it wont. Also i dont think this is your problem anyway perhaps if you posted some of the offending code i may be able to assist you further. Im afraid ill be moving to houston this thursday (in 2 days) and i wont be back on for some time so if you read this late dont think that my long wait is at all an unwillingness to help im simply not here lol.


Have Fun smile