🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #13969

Re: changing menu bar items

#13969
From: Bill Turner
Date: Mon, 05 Feb 1990 17:35
16 lines
1118 bytes
> It is MUCH easier to swap menus. Just call SetMenu(hWnd, hMenu); 
> hMenu MUST have been returned from CreateMenu, LoadMenu or
> LoadMenuIndirect.

WARNING -- if you do this, when the window is destroyed the current
menu is also destroyed.  I.e, if you have called CreateMenu for three
different menus, and set one of them as the main menu, that one will
be automagically destroyed but the other two will continue to take up
memory.

Also remember that if you register a menu with the window, it will
be automatically created, but if you set a different menu it will not
be automatically destroyed.

--Bill Turner (bturner@hp-pcd.hp.com)
HP Interface Technology Operation
Technical Details
Message-ID: <106580081@hpcvlx.cv.hp.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!helios.ee.lbl.gov!ucsd!ucsdhub!hp-sdd!hp-pcd!hpcvlx!bturner
References: <34071@ucbvax.BERKELEY.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!helios.ee.lbl.gov!ucsd!ucsdhub!hp-sdd!hp-pcd!hpcvlx!bturner
From: bturner@hpcvlx.cv.hp.com (Bill Turner)
Newsgroups: comp.windows.ms
Subject: Re: changing menu bar items
Message-ID: <106580081@hpcvlx.cv.hp.com>
Date: 5 Feb 90 17:35:27 GMT
References: <34071@ucbvax.BERKELEY.EDU>
Organization: Hewlett-Packard Co., Corvallis, OR, USA
Lines: 16