Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Disable System Menu in QuickWin

onkelhotte
New Contributor II
847 Views

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

0 Kudos
3 Replies
Jugoslav_Dujic
Valued Contributor II
847 Views
Method 1:
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)




0 Kudos
onkelhotte
New Contributor II
847 Views

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

0 Kudos
onkelhotte
New Contributor II
847 Views

Cool, just found an answer to a question I already asked six and half years ago :-)

0 Kudos
Reply