|
-
May 10th, 1999, 10:34 AM
#1
How to create multitasking in the window?
I use VC++ 5.0, MFC 4.21.
I have a function, which archives a database and writes in the window resources. But, function does not give a focus to window to use controls (buttons etc.). Why or how to correctly program it?
I use modalless dialog by:
m_pArchivDlg->Create(IDD_ARCHIVEDIALOG);
m_pArchivDlg->ShowWindow(SW_SHOW);
m_pArchivDlg->UpdateWindow();
... and now continues long procedure, which using ODBC archives a database.
I can change a static text by:
m_pArchivDlg->m_StaticTable.SetWindowText(TEXT);
but this is all!
-
May 10th, 1999, 12:57 PM
#2
Re: How to create multitasking in the window?
Hi,
i guess by creating a separate worker thread for your database work may solve your problem, try to get help on AfxBeginThread().
Thanks
Chetan
Nothing is imposible.
-
May 10th, 1999, 03:45 PM
#3
Re: How to create multitasking in the window?
i think it is maybe easier to put in your big loop some message dispatcher that will check for messages and post them to the window.. In that way you will be able to communicate with your dialog while he is processing the data..
Sini
-
May 10th, 1999, 08:31 PM
#4
Re: How to create multitasking in the window?
Yap, if you can use PeekMessage or something similar to that and solve your problem then definitely this method should be the first choice over creating all together different thread as creating a thread is definitely an overhead.
Chetan
Practice makes the man perfect.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|