Click here to Skip to main content
15,920,704 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: PostNcDestroy problems Pin
David Crow13-Jun-03 10:41
David Crow13-Jun-03 10:41 
GeneralRe: PostNcDestroy problems Pin
John M. Drescher13-Jun-03 10:46
John M. Drescher13-Jun-03 10:46 
GeneralRe: PostNcDestroy problems Pin
andyg.10113-Jun-03 10:51
andyg.10113-Jun-03 10:51 
GeneralRe: PostNcDestroy problems Pin
John M. Drescher13-Jun-03 10:54
John M. Drescher13-Jun-03 10:54 
GeneralRe: PostNcDestroy problems Pin
andyg.10113-Jun-03 10:58
andyg.10113-Jun-03 10:58 
GeneralRe: PostNcDestroy problems Pin
John M. Drescher13-Jun-03 11:09
John M. Drescher13-Jun-03 11:09 
GeneralRe: PostNcDestroy problems Pin
Toni7813-Jun-03 18:01
Toni7813-Jun-03 18:01 
GeneralRe: PostNcDestroy problems Pin
andyg.10113-Jun-03 22:21
andyg.10113-Jun-03 22:21 
Hello again guys
I've solved the problem I think. I put in the handler for WM_CLOSE, and the following code
void CCommsDlg::OnClose() 
{	
	CDialog::OnClose();
	
	DestroyWindow();
}


This now works fine, doing exactly what I want. Previously the code I had used was

void CCommsDlg::OnClose() 
{	
        DestroyWindow();

	CDialog::OnClose();
	
}

which gave me the exception. I'm still not sure why though no doubt one of you guys can inform me and I'm still puzzled by the fact that the code given in Nishants example in the dialogues section makes no call to OnClose at all and still calls PostNcDestroy. However now my code works I'm a happy man Smile | :) though it'd be better if I understood why!

Cheers
Andy
GeneralRe: PostNcDestroy problems Pin
Toni7813-Jun-03 23:05
Toni7813-Jun-03 23:05 
GeneralOnDestroy called for base class first... Pin
Miszou13-Jun-03 8:24
Miszou13-Jun-03 8:24 
GeneralRe: OnDestroy called for base class first... Pin
valikac13-Jun-03 9:39
valikac13-Jun-03 9:39 
GeneralRe: OnDestroy called for base class first... Pin
Miszou13-Jun-03 9:49
Miszou13-Jun-03 9:49 
Generalproblem with passing STL variables across the DLL boundaries Pin
Anonymous13-Jun-03 7:56
Anonymous13-Jun-03 7:56 
GeneralRe: problem with passing STL variables across the DLL boundaries Pin
Chris Losinger13-Jun-03 9:23
professionalChris Losinger13-Jun-03 9:23 
GeneralRe: problem with passing STL variables across the DLL boundaries Pin
Anonymous13-Jun-03 12:05
Anonymous13-Jun-03 12:05 
GeneralRe: problem with passing STL variables across the DLL boundaries Pin
Anonymous13-Jun-03 12:10
Anonymous13-Jun-03 12:10 
GeneralRe: problem with passing STL variables across the DLL boundaries Pin
Anonymous15-Jun-03 17:01
Anonymous15-Jun-03 17:01 
Generalreading file 's header Pin
pnpfriend13-Jun-03 7:18
pnpfriend13-Jun-03 7:18 
GeneralRe: reading file 's header Pin
David Crow13-Jun-03 7:29
David Crow13-Jun-03 7:29 
GeneralRe: reading file 's header Pin
pnpfriend13-Jun-03 8:33
pnpfriend13-Jun-03 8:33 
GeneralRe: reading file 's header Pin
David Crow13-Jun-03 8:41
David Crow13-Jun-03 8:41 
GeneralRe: reading file 's header Pin
pnpfriend13-Jun-03 8:54
pnpfriend13-Jun-03 8:54 
GeneralRe: reading file 's header Pin
David Crow13-Jun-03 9:02
David Crow13-Jun-03 9:02 
GeneralRe: reading file 's header Pin
pnpfriend13-Jun-03 10:18
pnpfriend13-Jun-03 10:18 
GeneralRe: reading file 's header Pin
David Crow13-Jun-03 10:32
David Crow13-Jun-03 10:32 

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.