Click here to Skip to main content
16,010,650 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generaldialog box problems Pin
r i s h a b h s19-Dec-02 23:18
r i s h a b h s19-Dec-02 23:18 
GeneralRe: dialog box problems Pin
Rage20-Dec-02 0:02
professionalRage20-Dec-02 0:02 
GeneralRe: dialog box problems Pin
Fredrik Skog20-Dec-02 0:06
Fredrik Skog20-Dec-02 0:06 
GeneralRe: dialog box problems Pin
r i s h a b h s20-Dec-02 0:27
r i s h a b h s20-Dec-02 0:27 
GeneralRe: dialog box problems Pin
Rage20-Dec-02 0:59
professionalRage20-Dec-02 0:59 
GeneralRe: dialog box problems Pin
Fredrik Skog20-Dec-02 1:01
Fredrik Skog20-Dec-02 1:01 
GeneralRe: dialog box problems Pin
helloyu20-Dec-02 2:29
helloyu20-Dec-02 2:29 
GeneralRe: dialog box problems Pin
Alvaro Mendez20-Dec-02 5:29
Alvaro Mendez20-Dec-02 5:29 
Rage gave you a great response, but let me just add my personal solution:

Like Rage said, the modeless dialog dissapears because you're probably creating the class as a local variable.... so, to kill 2 birds with one stone, the solution is simple: create the class as a static variable!

static CMyDialog s_dlg;
 
if (::IsWindow(s_dlg.m_hWnd))
  s_dlg.ShowWindow(SW_SHOWNORMAL);
else
  s_dlg.Create(CMyDialog::IDD);


This keeps your dialog class around and also ensures that only one is created.

Regards,
Alvaro


Well done is better than well said. -- Benjamin Franklin
(I actually prefer medium-well.)
GeneralLine Object in MFC! Pin
Alex H 198319-Dec-02 22:32
Alex H 198319-Dec-02 22:32 
GeneralRe: Line Object in MFC! Pin
Iain Clarke, Warrior Programmer19-Dec-02 22:49
Iain Clarke, Warrior Programmer19-Dec-02 22:49 
GeneralRe: Line Object in MFC! Pin
Jörgen Sigvardsson21-Dec-02 10:09
Jörgen Sigvardsson21-Dec-02 10:09 
GeneralChanging the font of editor Pin
Anonymous19-Dec-02 22:22
Anonymous19-Dec-02 22:22 
GeneralDrawedge with custom color.. Pin
Neha19-Dec-02 21:53
Neha19-Dec-02 21:53 
GeneralResource Strings vs. CStrings Pin
Alexandru Savescu19-Dec-02 21:00
Alexandru Savescu19-Dec-02 21:00 
GeneralRe: Resource Strings vs. CStrings Pin
jhwurmbach19-Dec-02 21:17
jhwurmbach19-Dec-02 21:17 
GeneralChange CWnd object BackGround Color Pin
HellShrimp4free19-Dec-02 20:52
HellShrimp4free19-Dec-02 20:52 
GeneralRe: Change CWnd object BackGround Color Pin
jhwurmbach19-Dec-02 21:20
jhwurmbach19-Dec-02 21:20 
GeneralDraw a Bitmap over the Window. Pin
Alex H 198319-Dec-02 20:24
Alex H 198319-Dec-02 20:24 
GeneralRe: Draw a Bitmap over the Window. Pin
Christian Graus19-Dec-02 20:31
protectorChristian Graus19-Dec-02 20:31 
GeneralSeparete the file extension from a filename Pin
Rickard Andersson2019-Dec-02 20:24
Rickard Andersson2019-Dec-02 20:24 
GeneralRe: Separete the file extension from a filename Pin
Christian Graus19-Dec-02 20:32
protectorChristian Graus19-Dec-02 20:32 
GeneralRe: Separete the file extension from a filename Pin
Rickard Andersson2019-Dec-02 20:46
Rickard Andersson2019-Dec-02 20:46 
GeneralRe: Separete the file extension from a filename Pin
Christian Graus19-Dec-02 21:04
protectorChristian Graus19-Dec-02 21:04 
GeneralRe: Separete the file extension from a filename Pin
Rickard Andersson2020-Dec-02 3:28
Rickard Andersson2020-Dec-02 3:28 
GeneralRe: Separete the file extension from a filename Pin
Fredrik Skog19-Dec-02 20:36
Fredrik Skog19-Dec-02 20:36 

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.