Article View: comp.windows.ms.programmer
Article #476Re: Removing & UnRemoving SysMenu, TitleBar, MinMax buttons
From: Jeroen W. Pluimers
Date: Wed, 12 Aug 1992 18:39
Date: Wed, 12 Aug 1992 18:39
29 lines
1847 bytes
1847 bytes
In article <1992Aug11.220535.14031@u.washington.edu> goble@hardy.u.washington.edu (Brian Goble) writes:
>I am trying to make my Windows app capable of dynamically changing
>I am writing a program that sometimes will be on display and I don't
>want the users to be able to resize the window, minimize it, close it, etc.
>(although I'll implement a "secret" method to regain control :)
>
>Rather than just trapping the above messages, I'd rather "remove" (or hide)
To get rid of the buttons, create your window without the ws_MinimizeBox
and ws_MaximizeBox.
Tchange the system menu, get a menu handle as follows:
hMenu := GetSystemMenu(hWindow, False);
Then you can modify the menu as follows (for instance to remove the Close
option):
ModifyMenu (hMenu, sc_Close, mf_ByCommand + mf_Grayed);
This will gray the Close option.
--
o _ _ _ _ _ voice: +31-2522-20908 (19:00-24:00 UTC)
/ (_' | (_) (_' | | snail: P.S.O.
__/ attn. Jeroen W. Pluimers
P.O. Box 266
jeroenp@rulfc1.LeidenUniv.nl 2170 AG Sassenheim
jeroen_pluimers@f521.n281.z2.fidonet.org The Netherlands
Technical Details
Message-ID:
<1992Aug12.183957.27242@rulway.LeidenUniv.nl>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!rulway.LeidenUniv.nl!rulfc1!jeroenpReferences:
<1992Aug11.220535.14031@u.washington.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.ms.programmer,comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!rulway.LeidenUniv.nl!rulfc1!jeroenp From: jeroenp@rulfc1.LeidenUniv.nl (Jeroen W. Pluimers) Subject: Re: Removing & UnRemoving SysMenu, TitleBar, MinMax buttons Message-ID: <1992Aug12.183957.27242@rulway.LeidenUniv.nl> Sender: root@rulway.LeidenUniv.nl (System PRIVILEGED Account) Nntp-Posting-Host: rulfc1.leidenuniv.nl Organization: Dept. FMC, Gorlaeus Labs, Leiden University, The Netherlands References: <1992Aug11.220535.14031@u.washington.edu> Date: Wed, 12 Aug 92 18:39:57 GMT Lines: 29