- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
is it possible to disable the system menu in a CVF 6.6c QuickWin application? To be precise I want to disable the close button.
Thanks in advance,
OnkelHotte
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Method 1:
Method 2:
hFrame = GetHwndQQ(QWIN$FRAMEWINDOW)
hMenu = GetSystemMenu(hFrame, 0)
iRet = EnableMenuItem(hMenu, SC_CLOSE, IOR(MF_BYCOMMAND, MF_GRAYED))
Method 2:
iStyle = GetWindowLong(hFrame, GWL_STYLE)
iStyle = IAND(iStyle, NOT(WS_SYSMENU))
iRet = SetWindowLong(hFrame, GWL_STYLE, iStyle)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Jugoslav,
as always, you were a great help!
I tried SetWindowLong before, but I had not used it with NOT(WS_SYSMENU), and that brought not the expected result.
Hav a nice week,
Markus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cool, just found an answer to a question I already asked six and half years ago :-)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page