Click here to Skip to main content
15,910,878 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSimple Noob Question: Problem with "CONTROL PARENT" setting in tabbed dialog Pin
B_U_A5-Mar-09 23:23
B_U_A5-Mar-09 23:23 
AnswerRe: Simple Noob Question: Problem with "CONTROL PARENT" setting in tabbed dialog Pin
«_Superman_»6-Mar-09 1:01
professional«_Superman_»6-Mar-09 1:01 
AnswerRe: Simple Noob Question: Problem with "CONTROL PARENT" setting in tabbed dialog Pin
Nishad S6-Mar-09 2:19
Nishad S6-Mar-09 2:19 
QuestionRe: Simple Noob Question: Problem with "CONTROL PARENT" setting in tabbed dialog Pin
B_U_A6-Mar-09 9:21
B_U_A6-Mar-09 9:21 
QuestionRe: Simple Noob Question: Problem with "CONTROL PARENT" setting in tabbed dialog Pin
B_U_A6-Mar-09 22:18
B_U_A6-Mar-09 22:18 
QuestionProblems with Overriding OnOK() and OnCancel() Pin
B_U_A7-Mar-09 16:17
B_U_A7-Mar-09 16:17 
AnswerRe: Simple Noob Question: Problem with "CONTROL PARENT" setting in tabbed dialog Pin
Nishad S8-Mar-09 5:31
Nishad S8-Mar-09 5:31 
QuestionRe: Simple Noob Question: Problem with "CONTROL PARENT" setting in tabbed dialog Pin
B_U_A9-Mar-09 1:03
B_U_A9-Mar-09 1:03 
Thanks for reiterating your advice. The problem I have is that I don't know how to do it properly?
Do I understand you right in that not only the Close button in the title bar (X) as well as the ALT+F4 key combination, BUT ALSO hitting the ESC key or the ENTER key, any of these four events would trigger an WM_CLOSE message?

I gave it a go and as per your post I have added ON_WM_CLOSE using the ClassWizard (see excerpt of header below)...

//{{AFX_MSG(CTestDlg)
        virtual void OnOK();
	afx_msg void OnClose();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:


...and it is also in the message map in the *.cpp file:

BEGIN_MESSAGE_MAP(CTestDlg, CDialog)
	//{{AFX_MSG_MAP(CTestDlg)
	ON_WM_SYSCOMMAND()
	ON_WM_PAINT()
	ON_WM_QUERYDRAGICON()
	ON_WM_CLOSE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


However when running the application, the ESC key as well as the ENTER key are still closing the program. So that didn't really do the trick.
I would appreciate if you could please specify a bit more detailed.
Many thanks Wink | ;-)
AnswerRe: Simple Noob Question: Problem with "CONTROL PARENT" setting in tabbed dialog Pin
Nishad S9-Mar-09 2:06
Nishad S9-Mar-09 2:06 
QuestionRe: Simple Noob Question: Problem with "CONTROL PARENT" setting in tabbed dialog Pin
B_U_A9-Mar-09 23:50
B_U_A9-Mar-09 23:50 
AnswerRe: Simple Noob Question: Problem with "CONTROL PARENT" setting in tabbed dialog Pin
Nishad S10-Mar-09 23:44
Nishad S10-Mar-09 23:44 
GeneralRe: Simple Noob Question: Problem with "CONTROL PARENT" setting in tabbed dialog Pin
B_U_A12-Mar-09 22:32
B_U_A12-Mar-09 22:32 
GeneralRe: Simple Noob Question: Problem with "CONTROL PARENT" setting in tabbed dialog Pin
Nishad S13-Mar-09 1:59
Nishad S13-Mar-09 1:59 
Questioncreating toolbar for IE Pin
Ash_VCPP5-Mar-09 22:08
Ash_VCPP5-Mar-09 22:08 
AnswerRe: creating toolbar for IE Pin
SandipG 5-Mar-09 22:16
SandipG 5-Mar-09 22:16 
GeneralRe: creating toolbar for IE Pin
Ash_VCPP5-Mar-09 22:19
Ash_VCPP5-Mar-09 22:19 
AnswerRe: creating toolbar for IE Pin
Hamid_RT6-Mar-09 0:25
Hamid_RT6-Mar-09 0:25 
Questionwhat is "commit storage" any way? Pin
JackPuppy5-Mar-09 21:09
JackPuppy5-Mar-09 21:09 
AnswerRe: what is "commit storage" any way? Pin
Eytukan5-Mar-09 22:39
Eytukan5-Mar-09 22:39 
GeneralRe: what is "commit storage" any way? Pin
JackPuppy5-Mar-09 23:22
JackPuppy5-Mar-09 23:22 
QuestionResizing CListCtrl Pin
grassrootkit5-Mar-09 20:49
grassrootkit5-Mar-09 20:49 
AnswerRe: Resizing CListCtrl Pin
SandipG 5-Mar-09 21:04
SandipG 5-Mar-09 21:04 
GeneralRe: Resizing CListCtrl Pin
grassrootkit5-Mar-09 21:54
grassrootkit5-Mar-09 21:54 
GeneralRe: Resizing CListCtrl Pin
Code-o-mat5-Mar-09 22:47
Code-o-mat5-Mar-09 22:47 
GeneralRe: Resizing CListCtrl Pin
SandipG 5-Mar-09 23:05
SandipG 5-Mar-09 23:05 

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.