Click here to Skip to main content
15,900,258 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questioninterface programming Pin
Adno31-Aug-07 6:18
Adno31-Aug-07 6:18 
AnswerRe: interface programming Pin
led mike31-Aug-07 6:51
led mike31-Aug-07 6:51 
GeneralRe: interface programming Pin
Adno31-Aug-07 7:09
Adno31-Aug-07 7:09 
Questionhow to implement hotfix function? Pin
lostangels31-Aug-07 5:46
lostangels31-Aug-07 5:46 
AnswerRe: how to implement hotfix function? Pin
Roger Broomfield31-Aug-07 5:55
Roger Broomfield31-Aug-07 5:55 
QuestionRe: how to implement hotfix function? Pin
Hamid_RT31-Aug-07 19:09
Hamid_RT31-Aug-07 19:09 
AnswerRe: how to implement hotfix function? Pin
lostangels31-Aug-07 23:07
lostangels31-Aug-07 23:07 
Questionclistctrl oncustomdraw change row color Pin
Derrick Becker31-Aug-07 5:24
Derrick Becker31-Aug-07 5:24 
QuestionFindWindow Pin
Waldermort31-Aug-07 5:16
Waldermort31-Aug-07 5:16 
AnswerRe: FindWindow Pin
David Crow31-Aug-07 5:19
David Crow31-Aug-07 5:19 
GeneralRe: FindWindow Pin
Waldermort31-Aug-07 5:25
Waldermort31-Aug-07 5:25 
GeneralRe: FindWindow Pin
David Crow31-Aug-07 5:37
David Crow31-Aug-07 5:37 
GeneralRe: FindWindow Pin
Waldermort31-Aug-07 5:44
Waldermort31-Aug-07 5:44 
GeneralRe: FindWindow Pin
Roger Broomfield31-Aug-07 5:52
Roger Broomfield31-Aug-07 5:52 
GeneralRe: FindWindow Pin
Waldermort31-Aug-07 5:57
Waldermort31-Aug-07 5:57 
QuestionRe: FindWindow Pin
David Crow31-Aug-07 5:52
David Crow31-Aug-07 5:52 
QuestionMFC OnInitDialog lengthy process halts screen painting Pin
littleGreenDude31-Aug-07 5:02
littleGreenDude31-Aug-07 5:02 
MFC OnInitDialog lengthy process halts screen painting

I have a problem, this is similar to another post, where a process in OnInitDialog takes too long and slows the screen from painting on dialog startup.

OnInitDialog<br />
{<br />
if()<br />
  // do something<br />
else<br />
  DoSomethingVerryLengthy();<br />
}


The previously posted solution used a Create instead of a DoModal. This allows us to seperate the initialization of the dialog from the lengthy process. The posted solution looks like this:

pOtherDlg = new COtherDlg(...);<br />
pOtherDlg->Create(...);<br />
//** Optional if pOtherDlg not created with WS_VISIBLE style **<br />
pOtherDlg->ShowWindow(SW_SHOW);<br />
pOtherDlg->UpdateWindow();<br />
//** End Optional if pOtherDlg not created with WS_VISIBLE style **<br />
pOtherDlg->DoSomethingVerryLengthy();


My question is, since this code replaces pOtherDlg->DoModal(), and DoModal waits for the dialog to close before continuing execution. How do I make this new chunk of code wait until the user closes pOtherDlg?

Thanks in advance for the help...Smile | :)
AnswerRe: MFC OnInitDialog lengthy process halts screen painting Pin
Naveen31-Aug-07 5:11
Naveen31-Aug-07 5:11 
QuestionRe: MFC OnInitDialog lengthy process halts screen painting Pin
David Crow31-Aug-07 5:16
David Crow31-Aug-07 5:16 
QuestionVisual indication (Red, green) Pin
__yash__31-Aug-07 4:35
professional__yash__31-Aug-07 4:35 
AnswerRe: Visual indication (Red, green) Pin
Mark Salsbery31-Aug-07 5:02
Mark Salsbery31-Aug-07 5:02 
GeneralRe: Visual indication (Red, green) Pin
__yash__31-Aug-07 5:38
professional__yash__31-Aug-07 5:38 
GeneralRe: Visual indication (Red, green) Pin
Mark Salsbery31-Aug-07 5:48
Mark Salsbery31-Aug-07 5:48 
GeneralRe: Visual indication (Red, green) Pin
__yash__31-Aug-07 5:49
professional__yash__31-Aug-07 5:49 
GeneralRe: Visual indication (Red, green) Pin
Mark Salsbery31-Aug-07 6:13
Mark Salsbery31-Aug-07 6:13 

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.