Click here to Skip to main content
15,918,267 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Memory leak?? Pin
Yulianto.23-Oct-04 17:05
Yulianto.23-Oct-04 17:05 
GeneralRe: Memory leak?? Pin
Bob Stanneveld24-Oct-04 2:08
Bob Stanneveld24-Oct-04 2:08 
AnswerRe: Memory leak?? Pin
Tim Smith23-Oct-04 18:14
Tim Smith23-Oct-04 18:14 
GeneralRe: Memory leak?? Pin
Bob Stanneveld24-Oct-04 2:07
Bob Stanneveld24-Oct-04 2:07 
AnswerRe: Memory leak?? Pin
Neville Franks24-Oct-04 0:18
Neville Franks24-Oct-04 0:18 
GeneralRe: Memory leak?? Pin
Bob Stanneveld24-Oct-04 2:02
Bob Stanneveld24-Oct-04 2:02 
GeneralError closing dialog Pin
Larsson23-Oct-04 6:55
Larsson23-Oct-04 6:55 
GeneralRe: Error closing dialog Pin
BlackDice23-Oct-04 7:12
BlackDice23-Oct-04 7:12 
I dont' know if you put the CModless m_modless in both places just for our benefit, but a modeless dialog needs to be declared as a member variable of the calling class. If it's declared as a local variable, it goes out of scope as soon as the function's over.

But this is what I do. When I create the modeless dialog, I send in a pointer to the calling class. In the calling class, I #define something like WM_CLOSE_MYDIALOG as WM_USER + 101. Then in the modeless dialog's close handler I do this:

m_pCallingClass->SendMessage(WM_CLOSE_MYDIALOG);

make a message map for that message in the calling class, and in the handler call DestroyWindow() for the modeless dialog member variable. hope this helps, because you did help me. Thanks!!

Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store

My articles[^]
bdiamond Sleepy | :zzz:
GeneralRe: Error closing dialog Pin
Larsson23-Oct-04 7:54
Larsson23-Oct-04 7:54 
GeneralEmbedded dialog question Pin
BlackDice23-Oct-04 6:47
BlackDice23-Oct-04 6:47 
GeneralRe: Embedded dialog question Pin
Larsson23-Oct-04 6:56
Larsson23-Oct-04 6:56 
GeneralRESOLVED Pin
BlackDice23-Oct-04 8:10
BlackDice23-Oct-04 8:10 
Questionhow to download a web-page? Pin
includeh1023-Oct-04 6:09
includeh1023-Oct-04 6:09 
AnswerRe: how to download a web-page? Pin
Timothy Grabrian23-Oct-04 15:57
professionalTimothy Grabrian23-Oct-04 15:57 
AnswerRe: how to download a web-page? Pin
Michael Hendrickx24-Oct-04 15:49
Michael Hendrickx24-Oct-04 15:49 
AnswerRe: how to download a web-page? Pin
ThatsAlok24-Oct-04 22:48
ThatsAlok24-Oct-04 22:48 
QuestionError ? Pin
Larsson23-Oct-04 5:59
Larsson23-Oct-04 5:59 
AnswerRe: Error ? Pin
Michael P Butler23-Oct-04 8:51
Michael P Butler23-Oct-04 8:51 
Generalis there some thing similar to CWebBrowser2... Pin
includeh1023-Oct-04 5:16
includeh1023-Oct-04 5:16 
QuestionGUID's how importatnt are they? Pin
BlackDice23-Oct-04 3:38
BlackDice23-Oct-04 3:38 
AnswerRe: GUID's how importatnt are they? Pin
Leyu23-Oct-04 8:10
Leyu23-Oct-04 8:10 
AnswerRe: GUID's how importatnt are they? Pin
Blake Miller25-Oct-04 5:29
Blake Miller25-Oct-04 5:29 
GeneralRe: GUID's how importatnt are they? Pin
BlackDice25-Oct-04 11:52
BlackDice25-Oct-04 11:52 
Generalputting a dialog into a picture box control (or static text control) Pin
BlackDice23-Oct-04 3:35
BlackDice23-Oct-04 3:35 
GeneralRe: putting a dialog into a picture box control (or static text control) Pin
Maximilien23-Oct-04 3:50
Maximilien23-Oct-04 3:50 

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.