doModal

C

Clive Moore

Is it possible to load a CDialog from my application and display it
without stopping the excution of a program. I have tried calling
doModal from the initinstance function but this stops
the rest of the program from executing.

m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
// process info

I have also tried calling showwindow which works ok apart from
the fact the the dialog is frozen on the screen when my program is doing
its processing (run function). The dialog isn't repainted and there is
no application present in the program bar at the bottom of the hpc
screen.

m_objDialog = new FDCSIAnywhereDlg();
m_objDialog->Create(IDD_DIALOG_SYNC,NULL);
m_objDialog->ShowWindow(WS_OVERLAPPEDWINDOW);
m_objDialog->UpdateWindow();
m_pMainWnd = m_objDialog;



Clive
 
P

Peter Koch Larsen

Clive Moore said:
Is it possible to load a CDialog from my application and display it
without stopping the excution of a program. I have tried calling
doModal from the initinstance function but this stops
the rest of the program from executing.

m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
// process info

I have also tried calling showwindow which works ok apart from
the fact the the dialog is frozen on the screen when my program is doing
its processing (run function). The dialog isn't repainted and there is
no application present in the program bar at the bottom of the hpc
screen.

m_objDialog = new FDCSIAnywhereDlg();
m_objDialog->Create(IDD_DIALOG_SYNC,NULL);
m_objDialog->ShowWindow(WS_OVERLAPPEDWINDOW);
m_objDialog->UpdateWindow();
m_pMainWnd = m_objDialog;



Clive

All these words - CDialog, doModal showwindow etc. make no sense in this
group. You should probably ask in some microsoft group.
(microsoft.public.mfc perhaps?)

/Peter
 
A

Aggro

Clive said:
Is it possible to load a CDialog from my application

This group is for standard C++ language only, not for MFC or dialogs,
try this group instead:

microsoft.public.vc.mfc
 
H

Howard

Clive Moore said:
Is it possible to load a CDialog from my application and display it
without stopping the excution of a program. I have tried calling
doModal from the initinstance function but this stops
the rest of the program from executing.

By definition, a "modal" dialog does exactly as you've described: your app
waits until the modal dialog is dismissed before continuing. Use a
"modeless" dialog.
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
// process info

I have also tried calling showwindow which works ok apart from
the fact the the dialog is frozen on the screen when my program is doing
its processing (run function). The dialog isn't repainted and there is
no application present in the program bar at the bottom of the hpc
screen.

If you're running a loop or somthing similar that's hogging your cpu time,
then you need to use one of the Windows-specific functions that gives time
back to the processor.
m_objDialog = new FDCSIAnywhereDlg();
m_objDialog->Create(IDD_DIALOG_SYNC,NULL);
m_objDialog->ShowWindow(WS_OVERLAPPEDWINDOW);
m_objDialog->UpdateWindow();
m_pMainWnd = m_objDialog;

All this is off-topic in this newsgroup, though. Check on the
news.microsoft.com server, in one of the windows or winapi newsgroups. A
search on groups.google.com is your best bet, I'd suggest.

-Howard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top