Click here to Skip to main content
15,212,532 members

C / C++ / MFC

 
AnswerRe: NT Service - working directory Pin
David Crow7-Aug-06 8:15
MemberDavid Crow7-Aug-06 8:15 
AnswerRe: NT Service - working directory Pin
Vipin Aravind7-Aug-06 8:59
MemberVipin Aravind7-Aug-06 8:59 
AnswerRe: NT Service - working directory Pin
Hamid_RT8-Aug-06 6:37
MemberHamid_RT8-Aug-06 6:37 
QuestionNo browse info in VS2005 Pin
Jim A. Johnson7-Aug-06 5:14
MemberJim A. Johnson7-Aug-06 5:14 
QuestionCDialogBar with ScrollBar [modified] Pin
hsdjusa7-Aug-06 5:00
Memberhsdjusa7-Aug-06 5:00 
AnswerRe: CDialogBar with ScrollBar Pin
Michael Dunn7-Aug-06 7:28
sitebuilderMichael Dunn7-Aug-06 7:28 
QuestionA trouble question about the dialog Pin
xuwenq887-Aug-06 4:50
Memberxuwenq887-Aug-06 4:50 
AnswerRe: A trouble question about the dialog Pin
Cedric Moonen7-Aug-06 5:05
MemberCedric Moonen7-Aug-06 5:05 
First, the problem with your code is that you have a pointer local to a function (the CMydlg *dlg pointer which is in showDlg). You allocate memory for this pointer but when you reach the end of the function, you don't have any grasp over the pointer anymore. Thus, this will result in a memory leak. Instead of making it local in the function, make it a member of your class (CMyapp). This way, you can control if this dialog is already created (pointer points to a valid dialog class) and you can retrieve the status (if the dialog is visible or not).

And, furthermore, there is no need to make it a pointer, just show/hide it with the CWnd::ShowWindow function.


Cédric Moonen
Software developer

Charting control

GeneralRe: A trouble question about the dialog Pin
xuwenq887-Aug-06 17:41
Memberxuwenq887-Aug-06 17:41 
GeneralRe: A trouble question about the dialog Pin
Cedric Moonen7-Aug-06 20:19
MemberCedric Moonen7-Aug-06 20:19 
GeneralRe: A trouble question about the dialog Pin
xuwenq8812-Aug-06 5:27
Memberxuwenq8812-Aug-06 5:27 
Questionpacket Filtering with Pfbindinterfacetoindex Pin
_tasleem7-Aug-06 4:16
Member_tasleem7-Aug-06 4:16 
AnswerRe: packet Filtering with Pfbindinterfacetoindex Pin
Viorel.7-Aug-06 4:26
MemberViorel.7-Aug-06 4:26 
GeneralRe: packet Filtering with Pfbindinterfacetoindex Pin
_tasleem7-Aug-06 19:18
Member_tasleem7-Aug-06 19:18 
QuestionClassView Clutter in eMbedded Visual C++ Pin
Kegs457-Aug-06 3:50
MemberKegs457-Aug-06 3:50 
AnswerRe: ClassView Clutter in eMbedded Visual C++ Pin
Mike Dimmick14-Aug-06 16:52
MemberMike Dimmick14-Aug-06 16:52 
QuestionOnPositionChange doesn't work! [modified] Pin
dSolariuM7-Aug-06 3:46
MemberdSolariuM7-Aug-06 3:46 
QuestionAgain trouble with sorting COleSafeArray ! :) Pin
bosfan7-Aug-06 3:41
Memberbosfan7-Aug-06 3:41 
AnswerRe: Again trouble with sorting COleSafeArray ! :) Pin
Zac Howland7-Aug-06 5:23
MemberZac Howland7-Aug-06 5:23 
GeneralRe: Again trouble with sorting COleSafeArray ! :) Pin
bosfan7-Aug-06 21:08
Memberbosfan7-Aug-06 21:08 
Questiontracking mouse movement over button Pin
Manjunath S7-Aug-06 3:13
MemberManjunath S7-Aug-06 3:13 
AnswerRe: tracking mouse movement over button Pin
Maximilien7-Aug-06 4:32
MemberMaximilien7-Aug-06 4:32 
GeneralRe: tracking mouse movement over button Pin
Manjunath S7-Aug-06 5:13
MemberManjunath S7-Aug-06 5:13 
AnswerRe: tracking mouse movement over button Pin
Hamid_RT7-Aug-06 21:46
MemberHamid_RT7-Aug-06 21:46 
QuestionThe model dialog don't pop up,but it pops up after press the Alt button on the keyboard,why?How to resolve this problem? Pin
zhonglin.liang7-Aug-06 2:26
Memberzhonglin.liang7-Aug-06 2:26 

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.