tags:

views:

1106

answers:

5

Hi! I'm developing an MFC application and I've recently been searching for a good method to remove the icon from a Windows title bar, but retain the close button. The two obvious candidate solutions are turning off the system menu style or using the tool window style, but I would prefer not to disable the system menu or use the shrunken tool window title bar. Many MFC applications have this functionality, so I wonder: am I missing some standard way of doing this? Thanks for any suggestions.

A: 

what about getting rid of the system menu and then putting it back in another place yourseld (say next to the close button etc.)?

Keng
A: 
Aidan Ryan
+1  A: 

You can use WM_NCRBUTTONDOWN to detect if the user has right-clicked on your caption and then bring up the system menu.

Andrew Grant
+2  A: 

Set WS_EX_DLGMODALFRAME extended style.

EugeneZ
A: 

EugeneZ has the answer: "Set WS_EX_DLGMODALFRAME extended style." Whoever voted for "WM_NCRBUTTONDOWN" hasn't a clue. Nuff said.