Click here to Skip to main content
15,915,094 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: open dialog.. Pin
BaldwinMartin2-Dec-03 22:48
BaldwinMartin2-Dec-03 22:48 
GeneralRe: open dialog.. Pin
R. Thomas3-Dec-03 5:41
R. Thomas3-Dec-03 5:41 
GeneralRe: open dialog.. Pin
BaldwinMartin3-Dec-03 5:50
BaldwinMartin3-Dec-03 5:50 
GeneralRe: open dialog.. Pin
R. Thomas3-Dec-03 15:50
R. Thomas3-Dec-03 15:50 
GeneralRe: open dialog.. Pin
BaldwinMartin4-Dec-03 1:35
BaldwinMartin4-Dec-03 1:35 
GeneralOpen Program @ File Pin
Best Friend2-Dec-03 21:22
Best Friend2-Dec-03 21:22 
GeneralRe: Open Program @ File Pin
RChin2-Dec-03 22:32
RChin2-Dec-03 22:32 
GeneralSimple dialo app, memory leak Pin
J.B.2-Dec-03 21:13
J.B.2-Dec-03 21:13 
Hi guys,
I have just learned how to create a dialog-based application with mutiple child dialogs. So far it works fine, however, in Debug window, I always received memory leak warning upon the app exit :

Detected memory leaks!
Dumping objects ->
childdlg.cpp ........

I am just wondering what could cause this?
Basically, say, I have a parent dialog class, say CMyDlg and a child dialog class called CChildDlg. The child class was included on the top of MyDlg.cpp file

#include <ChildDlg.h>

CChildDlg *vChildDlg;

I embedded the child dialog into parent by putting the following codes in OnInitDialog() of the parent's cpp file, MyDlg.cpp.

vChildDlg = CChildDlg();
vChildDlg->Create(IDD_CHILD_DIALOG, this);
vChildDlg->SetWindowPos(this, 20, 20, 50, 50);
vChildDlg->ShowWindow(SW_SHOW);

That looks pretty straight forward. But why on the app's exit, it causes memory leak? Is there something I need to do perhaps in the parent and child class' destructor?

Thanks
GeneralRe: Simple dialo app, memory leak Pin
Anonymous2-Dec-03 21:22
Anonymous2-Dec-03 21:22 
GeneralRe: Simple dialo app, memory leak Pin
J.B.2-Dec-03 21:43
J.B.2-Dec-03 21:43 
GeneralRe: Simple dialo app, memory leak Pin
Marek Grzenkowicz2-Dec-03 21:23
Marek Grzenkowicz2-Dec-03 21:23 
Questionhow to get the message for window show? Pin
zecodela2-Dec-03 20:57
zecodela2-Dec-03 20:57 
AnswerRe: how to get the message for window show? Pin
BaldwinMartin2-Dec-03 22:50
BaldwinMartin2-Dec-03 22:50 
Generalscrolling logic Pin
R. Thomas2-Dec-03 20:48
R. Thomas2-Dec-03 20:48 
Questionmapping mode prob? Pin
R. Thomas2-Dec-03 20:40
R. Thomas2-Dec-03 20:40 
QuestionHow do I make wrapper funtion such as &quot;sprintf&quot; without using &quot;va_arg&quot;? Pin
dowa2-Dec-03 19:53
dowa2-Dec-03 19:53 
AnswerRe: How do I make wrapper funtion such as &quot;sprintf&quot; without using &quot;va_arg&quot;? Pin
Anonymous2-Dec-03 21:33
Anonymous2-Dec-03 21:33 
AnswerRe: How do I make wrapper funtion such as &quot;sprintf&quot; without using &quot;va_arg&quot;? Pin
BaldwinMartin2-Dec-03 23:01
BaldwinMartin2-Dec-03 23:01 
AnswerRe: How do I make wrapper funtion such as &quot;sprintf&quot; without using &quot;va_arg&quot;? Pin
David Crow3-Dec-03 3:39
David Crow3-Dec-03 3:39 
AnswerRe: How do I make wrapper funtion such as &quot;sprintf&quot; without using &quot;va_arg&quot;? Pin
Tim Smith3-Dec-03 4:24
Tim Smith3-Dec-03 4:24 
GeneralGetUserName() fails in ATL COM object Pin
bryces2-Dec-03 19:47
bryces2-Dec-03 19:47 
GeneralRe: GetUserName() fails in ATL COM object Pin
Michael P Butler2-Dec-03 20:20
Michael P Butler2-Dec-03 20:20 
GeneralRe: GetUserName() fails in ATL COM object Pin
bryces2-Dec-03 21:09
bryces2-Dec-03 21:09 
GeneralRe: GetUserName() fails in ATL COM object Pin
BaldwinMartin2-Dec-03 23:21
BaldwinMartin2-Dec-03 23:21 
Generalgripper in top left corner of resiable combo box Pin
Suneet Chandok2-Dec-03 19:08
Suneet Chandok2-Dec-03 19:08 

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.