How to disable system menu
-
Hello everybody, i want to avoid the menu which pops up with a right click on the taskbar button of an application but I find no way to trap this event. Does anybody have a solution for this problem?
MS
-
Hello everybody, i want to avoid the menu which pops up with a right click on the taskbar button of an application but I find no way to trap this event. Does anybody have a solution for this problem?
MS
The following code (though a bit ugly :rolleyes:) does the job:
CMenu * pMenu = GetSystemMenu(FALSE);
while ( pMenu->DeleteMenu(0, MF_BYPOSITION)) {}however, as side-effect, it also disables the close button at the top-right corner of the window (unfortunately I was not able to find another way... :rolleyes:). :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
The following code (though a bit ugly :rolleyes:) does the job:
CMenu * pMenu = GetSystemMenu(FALSE);
while ( pMenu->DeleteMenu(0, MF_BYPOSITION)) {}however, as side-effect, it also disables the close button at the top-right corner of the window (unfortunately I was not able to find another way... :rolleyes:). :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
Hello cpallini, thanks a lot, that seems to work. The disabled close button does not affect my purpose.
MS
-
Hello cpallini, thanks a lot, that seems to work. The disabled close button does not affect my purpose.
MS
-
Hello everybody, i want to avoid the menu which pops up with a right click on the taskbar button of an application but I find no way to trap this event. Does anybody have a solution for this problem?
MS
even you got the answer, i just wondere : why on earth do you want to remove this standard windows behaviour ?
You don't know where to start ? ask a good friend
-
even you got the answer, i just wondere : why on earth do you want to remove this standard windows behaviour ?
You don't know where to start ? ask a good friend