home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / mswindo / programm / misc / 1298 < prev    next >
Encoding:
Text File  |  1992-08-12  |  1.8 KB  |  42 lines

  1. Newsgroups: comp.windows.ms.programmer,comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!mcsun!sun4nl!rulway.LeidenUniv.nl!rulfc1!jeroenp
  3. From: jeroenp@rulfc1.LeidenUniv.nl (Jeroen W. Pluimers)
  4. Subject: Re: Removing & UnRemoving SysMenu, TitleBar, MinMax buttons
  5. Message-ID: <1992Aug12.183957.27242@rulway.LeidenUniv.nl>
  6. Sender: root@rulway.LeidenUniv.nl (System PRIVILEGED Account)
  7. Nntp-Posting-Host: rulfc1.leidenuniv.nl
  8. Organization: Dept. FMC, Gorlaeus Labs, Leiden University, The Netherlands
  9. References: <1992Aug11.220535.14031@u.washington.edu>
  10. Date: Wed, 12 Aug 92 18:39:57 GMT
  11. Lines: 29
  12.  
  13. In article <1992Aug11.220535.14031@u.washington.edu> goble@hardy.u.washington.edu (Brian Goble) writes:
  14. >I am trying to make my Windows app capable of dynamically changing 
  15. >I am writing a program that sometimes will be on display and I don't
  16. >want the users to be able to resize the window, minimize it, close it, etc.
  17. >(although I'll implement a "secret" method to regain control :)
  18. >
  19. >Rather than just trapping the above messages, I'd rather "remove" (or hide)
  20. To get rid of the buttons, create your window without the ws_MinimizeBox
  21. and ws_MaximizeBox.
  22.  
  23. Tchange the system menu, get a menu handle as follows:
  24.   
  25.   hMenu := GetSystemMenu(hWindow, False);
  26.  
  27. Then you can modify the menu as follows (for instance to remove the Close
  28. option):
  29.  
  30.   ModifyMenu (hMenu, sc_Close, mf_ByCommand + mf_Grayed);
  31.  
  32. This will gray the Close option.
  33.  
  34.  
  35. --
  36.     o _   _  _   _   _             voice: +31-2522-20908 (19:00-24:00 UTC)
  37.    / (_' |  (_) (_' | |            snail: P.S.O.
  38. __/                                       attn. Jeroen W. Pluimers
  39.                                           P.O. Box 266
  40. jeroenp@rulfc1.LeidenUniv.nl              2170 AG Sassenheim
  41. jeroen_pluimers@f521.n281.z2.fidonet.org  The Netherlands
  42.