470,632 Members | 2,300 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,632 developers. It's quick & easy.

doModal

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
3 5637

"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
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

"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.

Similar topics

1 post views Thread by matt | last post: by
4 posts views Thread by Zawa | last post: by
reply views Thread by Brent Baker | last post: by
7 posts views Thread by Seko | last post: by
8 posts views Thread by =?Utf-8?B?TWFuanJlZSBHYXJn?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.