Displaying Context Sensitive Help Button Without Displaying The Cancel Button in the System Menu
-
I am trying to find a way to only display the Context Sensitive '?' button in a dialog/property sheet - I don't want the 'X' Cancel button to be displayed. When I Call this sequence... ModifyStyleEx(0, WS_EX_CONTEXTHELP); // Add The Context Help '?' ModifyStyle(WS_SYSMENU, 0); // Remove system menu to get rid of the 'X' ..it first adds the '?' to the menu, and then secondly removes the menu. This results in neither the '?' nor the 'X' being displayed. This is the only way I know of to remove the 'X' from the menu - is there a way to have it display the '?' but not the 'X', or am I stuck here? If I am stuck, my second alternative is to find a way to disable the 'X' (grey it out) so that it is not clickable... any ideas on how I go about doing that? If you have any ideas on one of both of these solutions, please let me know.
-
I am trying to find a way to only display the Context Sensitive '?' button in a dialog/property sheet - I don't want the 'X' Cancel button to be displayed. When I Call this sequence... ModifyStyleEx(0, WS_EX_CONTEXTHELP); // Add The Context Help '?' ModifyStyle(WS_SYSMENU, 0); // Remove system menu to get rid of the 'X' ..it first adds the '?' to the menu, and then secondly removes the menu. This results in neither the '?' nor the 'X' being displayed. This is the only way I know of to remove the 'X' from the menu - is there a way to have it display the '?' but not the 'X', or am I stuck here? If I am stuck, my second alternative is to find a way to disable the 'X' (grey it out) so that it is not clickable... any ideas on how I go about doing that? If you have any ideas on one of both of these solutions, please let me know.
Call GetSystemMenu on your window. Then you can call DeleteMenu on the close menu item with the SC_CLOSE ID.
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life! -
Call GetSystemMenu on your window. Then you can call DeleteMenu on the close menu item with the SC_CLOSE ID.
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!Beautiful - thank you for the backup workaround for my problem! It greys out the 'X' just fine, allowing the '?' to be displayed. Hopefully there's a way to hide the 'X' altogether though, I'd much prefer that. : Dean 'Karnatos' Michaud