Click here to Skip to main content
16,005,169 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: hi all Pin
Hamid_RT28-Jun-06 20:05
Hamid_RT28-Jun-06 20:05 
GeneralRe: hi all Pin
ashish dogra28-Jun-06 20:45
ashish dogra28-Jun-06 20:45 
GeneralRe: hi all Pin
Hamid_RT28-Jun-06 20:46
Hamid_RT28-Jun-06 20:46 
GeneralRe: hi all Pin
ashish dogra28-Jun-06 21:05
ashish dogra28-Jun-06 21:05 
GeneralRe: hi all Pin
Hamid_RT28-Jun-06 21:32
Hamid_RT28-Jun-06 21:32 
GeneralRe: hi all Pin
ashish dogra28-Jun-06 21:45
ashish dogra28-Jun-06 21:45 
AnswerRe: hi all [modified] Pin
ovidiucucu28-Jun-06 20:31
ovidiucucu28-Jun-06 20:31 
GeneralRe: hi all Pin
Nawal K Gupta28-Jun-06 21:03
Nawal K Gupta28-Jun-06 21:03 
In you use this code
void OnSomeFunction()
{
CMy dlg;
dlg.Create(IDD_DIALOG1);
dlg.ShowWindow(1);
}
this is not safe, because the dlg object is created in Stack and it will get destroyed
as soon as the function is out of scope.

Create ModeLess Dialogs in Heap or Make Sure that the Object is not out of scope by making is
static or Global/Top Clsss Variale Like.
One Way of Doing It is:
void OnSomeFunction()
{
static CMy * Dlg =NULL;
if (!m_Dlg)
{
Dlg= new CMy();
Dlg->Create(IDD_DIALOG1);

}

dlg.ShowWindow(1);
}



GeneralRe: hi all Pin
ovidiucucu28-Jun-06 22:21
ovidiucucu28-Jun-06 22:21 
Questionregarding CFile Pin
happy_ram28-Jun-06 19:29
happy_ram28-Jun-06 19:29 
AnswerRe: regarding CFile Pin
Naveen28-Jun-06 19:33
Naveen28-Jun-06 19:33 
AnswerRe: regarding CFile Pin
David Crow29-Jun-06 3:19
David Crow29-Jun-06 3:19 
QuestionProblem with wizard type application Pin
rajeevktripathi28-Jun-06 19:10
rajeevktripathi28-Jun-06 19:10 
AnswerRe: Problem with wizard type application Pin
Blake Miller29-Jun-06 4:56
Blake Miller29-Jun-06 4:56 
QuestionPrinting [modified] Pin
RockyJames28-Jun-06 18:38
RockyJames28-Jun-06 18:38 
AnswerRe: Printing Pin
Hamid_RT28-Jun-06 19:29
Hamid_RT28-Jun-06 19:29 
GeneralRe: Printing [modified] Pin
RockyJames28-Jun-06 22:33
RockyJames28-Jun-06 22:33 
GeneralRe: Printing Pin
Hamid_RT28-Jun-06 23:13
Hamid_RT28-Jun-06 23:13 
Questiondialog box Pin
amit.code28-Jun-06 18:36
amit.code28-Jun-06 18:36 
AnswerRe: dialog box Pin
ashish dogra28-Jun-06 18:53
ashish dogra28-Jun-06 18:53 
AnswerRe: dialog box Pin
songlei28-Jun-06 18:54
songlei28-Jun-06 18:54 
AnswerRe: dialog box Pin
Hamid_RT28-Jun-06 18:57
Hamid_RT28-Jun-06 18:57 
Questionhow to change email address in outlook2003(VC6) [modified] Pin
cpusoft28-Jun-06 18:29
cpusoft28-Jun-06 18:29 
AnswerRe: how to change email address in outlook2003(VC6) Pin
Viorel.28-Jun-06 20:36
Viorel.28-Jun-06 20:36 
GeneralRe: how to change email address in outlook2003(VC6) Pin
cpusoft28-Jun-06 20:57
cpusoft28-Jun-06 20:57 

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.