Click here to Skip to main content
15,885,546 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to create shortcut of a file from MFC Pin
Binayak23-Dec-03 12:27
Binayak23-Dec-03 12:27 
AnswerRe: how to create shortcut of a file from MFC Pin
Selvam R24-Dec-03 12:39
professionalSelvam R24-Dec-03 12:39 
Questionhow to modify system path? Pin
Binayak23-Dec-03 12:07
Binayak23-Dec-03 12:07 
Questionhow can i add and edit records to MS Access Pin
Member 78215423-Dec-03 12:00
Member 78215423-Dec-03 12:00 
AnswerRe: how can i add and edit records to MS Access Pin
Selvam R24-Dec-03 12:54
professionalSelvam R24-Dec-03 12:54 
GeneralStatus dialog box Pin
Spank me!!23-Dec-03 11:57
Spank me!!23-Dec-03 11:57 
GeneralRe: Status dialog box Pin
Brad Bruce23-Dec-03 12:42
Brad Bruce23-Dec-03 12:42 
GeneralRe: Status dialog box Pin
j_a_m_s_p_o_o_n23-Dec-03 13:16
j_a_m_s_p_o_o_n23-Dec-03 13:16 
1. You need to make your 2nd dialog modeless, call Create instead of DoModal.
2. You can then perform your calculations and update the modeless dialog after each calculation.
3. You call DestroyWindow to remove the modeless dialog when complete.

You need a message pump to make your modeless dialog redraw. The could be after each calculation or embedded within to get more frequent updates.

You could add a cancel button to your modeless dialog and store a value in a bool when it is clicked. You then check the bool in the calculation to see if you want to quit.

Hope this fragment helps:

C2ndDialog dlg;
dlg.Create(IDD_2ND, this);
dlg.ShowWindow(SW_SHOW);
AfxGetMainWnd()->EnableWindow(FALSE);

{
//do calculation
//update value in dlg

MSG msg;
while ( ::PeekMessage( &msg, NULL, NULL, NULL, PM_NOREMOVE ) )
{
//message pump to redraw dlg
AfxGetApp()->PumpMessage();
}
}
while (calculating);

AfxGetMainWnd()->EnableWindow(TRUE);
workDlg.DestroyWindow();


j a m s p o o n
GeneralMimicing Swing Using C++ Problem Pin
Todd23-Dec-03 10:02
Todd23-Dec-03 10:02 
GeneralMatlab C++ Pin
Vincent Sim23-Dec-03 9:50
Vincent Sim23-Dec-03 9:50 
QuestionMFC Document / View - Who's on first? Pin
Vaclav23-Dec-03 9:43
Vaclav23-Dec-03 9:43 
AnswerRe: MFC Document / View - Who's on first? Pin
David Crow23-Dec-03 10:02
David Crow23-Dec-03 10:02 
Generaldrawing bitmap Pin
K. Shaffer23-Dec-03 7:12
K. Shaffer23-Dec-03 7:12 
GeneralRe: drawing bitmap Pin
Jörgen Sigvardsson23-Dec-03 7:13
Jörgen Sigvardsson23-Dec-03 7:13 
GeneralRe: drawing bitmap Pin
Ryan Binns23-Dec-03 15:04
Ryan Binns23-Dec-03 15:04 
GeneralProcess host... Pin
Orkun GEDiK23-Dec-03 6:53
Orkun GEDiK23-Dec-03 6:53 
GeneralRe: Process host... Pin
Selvam R23-Dec-03 11:29
professionalSelvam R23-Dec-03 11:29 
GeneralRe: Process host... Pin
Orkun GEDiK23-Dec-03 12:37
Orkun GEDiK23-Dec-03 12:37 
GeneralFile exists Pin
act_x23-Dec-03 6:27
act_x23-Dec-03 6:27 
GeneralRe: File exists Pin
Joe Woodbury23-Dec-03 6:58
professionalJoe Woodbury23-Dec-03 6:58 
GeneralRe: File exists Pin
David Crow23-Dec-03 10:05
David Crow23-Dec-03 10:05 
GeneralGetting the Image of a WIndow Pin
vladimir_india23-Dec-03 6:27
vladimir_india23-Dec-03 6:27 
GeneralRe: Getting the Image of a WIndow Pin
l a u r e n23-Dec-03 7:13
l a u r e n23-Dec-03 7:13 
GeneralRe: Getting the Image of a WIndow Pin
vladimir_india23-Dec-03 20:52
vladimir_india23-Dec-03 20:52 
GeneralRe: Getting the Image of a WIndow Pin
Robert Kuster23-Dec-03 10:28
Robert Kuster23-Dec-03 10:28 

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.