Click here to Skip to main content
15,914,594 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralProblem with GDI+ in Visual C++ 6.0 Pin
uus9911-Feb-05 17:50
uus9911-Feb-05 17:50 
GeneralCFileDialog Issues Pin
JKallen11-Feb-05 16:15
JKallen11-Feb-05 16:15 
GeneralRe: CFileDialog Issues Pin
Bob Ciora12-Feb-05 4:08
Bob Ciora12-Feb-05 4:08 
GeneralSIMPLE: "x" in System menu Pin
JKallen11-Feb-05 11:47
JKallen11-Feb-05 11:47 
GeneralRe: SIMPLE: "x" in System menu Pin
David Crow11-Feb-05 12:18
David Crow11-Feb-05 12:18 
GeneralRe: SIMPLE: "x" in System menu Pin
JKallen11-Feb-05 13:48
JKallen11-Feb-05 13:48 
GeneralRe: SIMPLE: "x" in System menu Pin
David Crow12-Feb-05 14:37
David Crow12-Feb-05 14:37 
GeneralRe: SIMPLE: "x" in System menu Pin
Shog911-Feb-05 12:25
sitebuilderShog911-Feb-05 12:25 
The message WM_SYSCOMMAND, with the command id SC_CLOSE. Spy++ is your friend.

However, you would be better off either disabling or hiding the [X] rather than leaving it visible and making it non-functional. This sort of thing is confusing and frustrating to users.

To hide: remove the WS_SYSMENU style from the window.
To disable: retrieve the system menu by calling GetSystemMenu(), then disable and gray the SC_CLOSE option by calling EnableMenuItem().

You should then disable the command (and also the Alt+F4 mnemonic)by intercepting the WM_SYSCOMMAND message and avoiding the default behavior if the command ID is SC_CLOSE.

Shog9

I'm not the Jack of Diamonds... I'm not the six of spades.
I don't know what you thought; I'm not your astronaut...

GeneralRe: SIMPLE: "x" in System menu Pin
JKallen11-Feb-05 13:54
JKallen11-Feb-05 13:54 
GeneralScreen redraw.. Pin
Neil scsn11-Feb-05 10:29
Neil scsn11-Feb-05 10:29 
GeneralRe: Screen redraw.. Pin
Shog911-Feb-05 12:00
sitebuilderShog911-Feb-05 12:00 
GeneralRe: Screen redraw.. Pin
Neil scsn11-Feb-05 12:07
Neil scsn11-Feb-05 12:07 
GeneralRe: Screen redraw.. Pin
Shog911-Feb-05 12:49
sitebuilderShog911-Feb-05 12:49 
GeneralNeural Network Code Pin
bitpusher11-Feb-05 10:21
bitpusher11-Feb-05 10:21 
GeneralRe: Neural Network Code Pin
rocky_pulley11-Feb-05 14:13
rocky_pulley11-Feb-05 14:13 
GeneralRe: Neural Network Code Pin
bitpusher11-Feb-05 14:30
bitpusher11-Feb-05 14:30 
GeneralRe: Neural Network Code Pin
humps12-Feb-05 0:25
humps12-Feb-05 0:25 
GeneralRe: Neural Network Code Pin
rocky_pulley12-Feb-05 6:28
rocky_pulley12-Feb-05 6:28 
GeneralRe: Neural Network Code Pin
conniepooh25-Mar-05 19:08
conniepooh25-Mar-05 19:08 
GeneralRe: Neural Network Code Pin
conniepooh25-Mar-05 19:13
conniepooh25-Mar-05 19:13 
GeneralObtaining List of File Names Pin
bitpusher11-Feb-05 10:19
bitpusher11-Feb-05 10:19 
GeneralRe: Obtaining List of File Names Pin
David Crow11-Feb-05 10:21
David Crow11-Feb-05 10:21 
GeneralRe: Obtaining List of File Names Pin
bitpusher11-Feb-05 10:27
bitpusher11-Feb-05 10:27 
GeneralRe: Obtaining List of File Names Pin
David Crow11-Feb-05 12:16
David Crow11-Feb-05 12:16 
GeneralRe: Obtaining List of File Names Pin
Ravi Bhavnani11-Feb-05 12:51
professionalRavi Bhavnani11-Feb-05 12:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.