Click here to Skip to main content
15,894,291 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionmodeless dialog WM_CLOSE - opinion Pin
23_44415-Feb-06 3:14
23_44415-Feb-06 3:14 
AnswerRe: modeless dialog WM_CLOSE - opinion Pin
Shog915-Feb-06 3:46
sitebuilderShog915-Feb-06 3:46 
AnswerRe: modeless dialog WM_CLOSE - opinion Pin
Rage15-Feb-06 3:59
professionalRage15-Feb-06 3:59 
GeneralRe: modeless dialog WM_CLOSE - opinion Pin
23_44415-Feb-06 4:43
23_44415-Feb-06 4:43 
GeneralRe: modeless dialog WM_CLOSE - opinion Pin
23_44415-Feb-06 4:58
23_44415-Feb-06 4:58 
GeneralRe: modeless dialog WM_CLOSE - opinion Pin
Shog915-Feb-06 7:53
sitebuilderShog915-Feb-06 7:53 
GeneralRe: modeless dialog WM_CLOSE - opinion Pin
23_44415-Feb-06 8:00
23_44415-Feb-06 8:00 
AnswerRe: modeless dialog WM_CLOSE - opinion Pin
23_44416-Feb-06 5:17
23_44416-Feb-06 5:17 
I believe that fact that the Dialog was not getting destroyed was because the WM_CLOSE message is being overridden by CDialog and calling and IDCANCEL. That would make sense. Before I posted the question though I attempted to follow the WM_CLOSE message to see where it was going - hence the reference to CWnd::Close from Help at the top of the question. When I put a break point at the OnClose function -user clicks the x at upper right hand part of dialog(Created through ClassWizard capturing the WM_CLOSE message) I am lead to this.
_AFXWIN_INLINE void CWnd::OnClose()
{ Default(); }

Continuing I am lead to
LRESULT CWnd::DefWindowProc(UINT nMsg, WPARAM wParam, LPARAM lParam)

Message being passed is 16 and IDCANCEL is defined as 2

Now I'm scratching my head. Wouldn't I see an IDCANCEL call or something like that. CWnd is supposed to destroy the window

Thanks
GeneralRe: modeless dialog WM_CLOSE - opinion Pin
Shog916-Feb-06 10:32
sitebuilderShog916-Feb-06 10:32 
GeneralRe: modeless dialog WM_CLOSE - opinion Pin
23_44416-Feb-06 10:39
23_44416-Feb-06 10:39 
GeneralRe: modeless dialog WM_CLOSE - opinion Pin
Shog916-Feb-06 10:45
sitebuilderShog916-Feb-06 10:45 
GeneralRe: modeless dialog WM_CLOSE - opinion Pin
23_44416-Feb-06 11:15
23_44416-Feb-06 11:15 
GeneralRe: modeless dialog WM_CLOSE - opinion Pin
Shog916-Feb-06 11:32
sitebuilderShog916-Feb-06 11:32 
GeneralRe: modeless dialog WM_CLOSE - opinion Pin
23_44416-Feb-06 11:49
23_44416-Feb-06 11:49 
GeneralRe: modeless dialog WM_CLOSE - opinion Pin
Shog916-Feb-06 12:25
sitebuilderShog916-Feb-06 12:25 
GeneralRe: modeless dialog WM_CLOSE - opinion Pin
23_44417-Feb-06 8:56
23_44417-Feb-06 8:56 
QuestionShades of a color Pin
DirA15-Feb-06 2:25
DirA15-Feb-06 2:25 
AnswerRe: Shades of a color Pin
Maximilien15-Feb-06 2:53
Maximilien15-Feb-06 2:53 
AnswerRe: Shades of a color Pin
Stephen Hewitt15-Feb-06 19:00
Stephen Hewitt15-Feb-06 19:00 
AnswerRe: Shades of a color Pin
Stephen Hewitt15-Feb-06 23:51
Stephen Hewitt15-Feb-06 23:51 
GeneralRe: Shades of a color Pin
DirA25-Feb-06 2:59
DirA25-Feb-06 2:59 
GeneralRe: Shades of a color Pin
Stephen Hewitt25-Feb-06 4:09
Stephen Hewitt25-Feb-06 4:09 
QuestionMultiple instance like MS Word Pin
Anilkumar K V15-Feb-06 1:54
Anilkumar K V15-Feb-06 1:54 
AnswerRe: Multiple instance like MS Word Pin
David Crow15-Feb-06 3:47
David Crow15-Feb-06 3:47 
GeneralRe: Multiple instance like MS Word Pin
Anilkumar K V15-Feb-06 17:04
Anilkumar K V15-Feb-06 17:04 

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.