Click here to Skip to main content
16,008,942 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Non-Modal dialog Pin
22-Sep-01 12:33
suss22-Sep-01 12:33 
GeneralRe: Non-Modal dialog Pin
Joaquín M López Muñoz22-Sep-01 12:38
Joaquín M López Muñoz22-Sep-01 12:38 
GeneralRe: Non-Modal dialog Pin
22-Sep-01 12:44
suss22-Sep-01 12:44 
GeneralRe: Non-Modal dialog Pin
Michael P Butler22-Sep-01 12:47
Michael P Butler22-Sep-01 12:47 
GeneralRe: Non-Modal dialog Pin
22-Sep-01 12:51
suss22-Sep-01 12:51 
GeneralRe: Non-Modal dialog Pin
22-Sep-01 13:07
suss22-Sep-01 13:07 
GeneralRe: Non-Modal dialog Pin
Ravi Bhavnani22-Sep-01 13:58
professionalRavi Bhavnani22-Sep-01 13:58 
GeneralRe: Non-Modal dialog Pin
Christian Graus22-Sep-01 12:42
protectorChristian Graus22-Sep-01 12:42 
Yeah, it does. Because your variable is local, the dialog appears for a split second, the variable goes out of scope, and is destroyed. You need to make the dialog a member variable, you can use a pointer, and check for NULL to see if it's visible or not, or use ::IsWindow, in which case you can make it an instance of the class.

I do this in the constructor of my modeless dialogs
if (Create(pParent, IDD)) ShowWindow(SW_SHOW);


and use pointers, then when I call new on the pointer, the dialog comes up right away.



Christian

As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.

Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
GeneralRe: Non-Modal dialog Pin
Michael P Butler22-Sep-01 12:48
Michael P Butler22-Sep-01 12:48 
GeneralRe: Non-Modal dialog Pin
User 988522-Sep-01 13:31
User 988522-Sep-01 13:31 
GeneralRe: Non-Modal dialog Pin
23-Sep-01 3:58
suss23-Sep-01 3:58 
QuestionIs there a LVS_SHOWSELNEVER? Pin
Joep22-Sep-01 9:13
Joep22-Sep-01 9:13 
AnswerRe: Is there a LVS_SHOWSELNEVER? Pin
Ravi Bhavnani22-Sep-01 9:28
professionalRavi Bhavnani22-Sep-01 9:28 
GeneralRe: Is there a LVS_SHOWSELNEVER? Pin
Joep22-Sep-01 11:04
Joep22-Sep-01 11:04 
GeneralRe: Is there a LVS_SHOWSELNEVER? Pin
Ravi Bhavnani22-Sep-01 11:24
professionalRavi Bhavnani22-Sep-01 11:24 
QuestionHow can I print multiple pages? I am really frustrated. Pin
DanYELL22-Sep-01 6:40
DanYELL22-Sep-01 6:40 
AnswerRe: How can I print multiple pages? I am really frustrated. Pin
22-Sep-01 9:05
suss22-Sep-01 9:05 
GeneralDialog size question Pin
22-Sep-01 6:24
suss22-Sep-01 6:24 
GeneralRe: Dialog size question Pin
Paolo Messina22-Sep-01 6:44
professionalPaolo Messina22-Sep-01 6:44 
GeneralRe: Dialog size question Pin
22-Sep-01 19:13
suss22-Sep-01 19:13 
Generalreturn BSTR Pin
Eran22-Sep-01 3:29
Eran22-Sep-01 3:29 
GeneralRe: return BSTR Pin
loket22-Sep-01 3:46
loket22-Sep-01 3:46 
GeneralRe: return BSTR Pin
Jason De Arte22-Sep-01 5:44
Jason De Arte22-Sep-01 5:44 
GeneralRe: return BSTR Pin
Rashid Thadha22-Sep-01 6:23
Rashid Thadha22-Sep-01 6:23 
GeneralVC++ and SQL Pin
Mr_Byte21-Sep-01 23:44
Mr_Byte21-Sep-01 23:44 

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.