473,385 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 5935

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: matt | last post by:
I use the following code in OnInitDialog for a secondary window opened in the main window by hitting DoModal(): P_Icons = IDI_BACK; HICON hIcon1 = (HICON)...
4
by: Zawa | last post by:
Why, when a I put and ActiveX Microsoft Web Browser component on my dialog (e.g. CBrowserDlg) and then call DoModal() dialog doesn't appear and DoModal() reasult -1 ? Should I register somehow this...
0
by: Brent Baker | last post by:
In our application we've created some temporary dialog boxes. Rather than the usual method of 1) calling the constructor for the dialog, 2) doing other initialization 3) calling DoModal() 4)...
7
by: Seko | last post by:
Hi! This is my first post here, so please excuse me for any mistakes I make. --------------------- I'm having a hard time displaying modal/non-modal dialog boxes in a Windows Forms...
1
by: Jürg Fross | last post by:
Hi all, I have to recompile a MFC++ Program developped under NT4.0 in XP. We store the printer settings (DEVMODE and DEVNAMES) as part of our document. When printing in batch mode, we need to...
0
by: alexh1000 | last post by:
When I insert the FlexGrid control in a dialog (using controls toolbar) the dialog fails to open on program execution(DoModal returns a -1). If I remove the FlexGrid from the dialog, the dialog...
1
by: alexh1000 | last post by:
When I insert the FlexGrid control in a dialog (using controls toolbar) the dialog fails to open on program execution (DoModal returns a -1). If I remove the FlexGrid from the dialog, the dialog...
3
by: gopython | last post by:
Hi all, Python:2.5 OS: Windows XP I have posted couple questions regarding the wxPython. Since I am still a newbie to Python, wxPython makes more sense to me than pyWin for gui programming....
8
by: =?Utf-8?B?TWFuanJlZSBHYXJn?= | last post by:
Hi I am trying to access a combobox of a dialogbox. The code is someting like that: void CDatabaseView::OnAddExpdata() { CExpDataDlg dlg; CComboBox* pCmbBox = static_cast<CComboBox*>
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.