|
-
March 3rd, 1999, 03:58 AM
#1
DoModal()???
Hi All,
My application is in MDI style & has used CFormView as the base view class.
Also my application has created a thread beside the main thread. This thread is used to get information from
a hardware installed on the PC. The program will continuously listen to the hardware to find whether there is
any new message coming.
I have used a while loop to continuously getting message from the hardware.
I have tested the program in the English version of Win95 & 98......it works....message is continuously getting
from the hardware & I can press a button at the frame to popup a dialog by using the function DoModal().
However, when I used the same executable file in the Chinese verison of Win98...it cannot work. While getting
message from the hardware, the dialog cannot be popped-up at the same time. The dialog will only appear after
stopping getting message from the hardware.
What is the problem about this? Any comment about this?
Thanks a lot!!!
-
March 14th, 1999, 06:59 AM
#2
Re: DoModal()???
Hello,
You say that you've try to run your application on a english version of Win9x and after on a chinese version. OK, but is it on same hardware ? I had made an application like yours to read barcode, it run fine with a PENTIUM PRO processor, but it hang on a PENTIUM... the problem was a while LOOP which hang the application when stopping the thread.
I hope it will help you
bye
-
April 22nd, 1999, 06:18 AM
#3
Re: DoModal()???
A little note that could help.
It is a good pratice to give time to system in a back thread for example with sleep(0).
Try to avoid a thread with an infinite loop without giving time to others processes. It is a very poor programming method especially under windows.
I hope this could help.
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
|