By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,507 Members | 1,758 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,507 IT Pros & Developers. It's quick & easy.

doModal

P: n/a
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
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"Clive Moore" <he********@hotmail.com> skrev i en meddelelse
news:47************************************@mygate .mailgate.org...
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
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG


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
Jul 22 '05 #2

P: n/a
Clive Moore wrote:
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
Jul 22 '05 #3

P: n/a

"Clive Moore" <he********@hotmail.com> wrote in message
news:47************************************@mygate .mailgate.org...
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
Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.