Modeless Dialog Box hangs... [modified]
-
Hi.. Previously I was using Modal dialog box with Thread, to continue one process and showing the dialog box continuously. But as I am getting problem with thread I need to use Modeless dialog Box. But when I replace the code of Modal Dialog box with Modeless Dialog Box. It hangs when redrawn. i.e. When it redrawns nothing displays in the dialog box. The Code I am using is as follows My application is such, that continuously check the data from the server and displys on the dialog.
hDisOwnDlg=CreateDialog( g_hInst, MAKEINTRESOURCE( IDD_DISOWN ), NULL, DisOwnDlgProc );
ShowWindow(hDisOwnDlg,SW_SHOW);Please Help me. -- modified at 10:11 Thursday 1st November, 2007
[ Screen Capture ][ Tool Tip ]
-
Hi.. Previously I was using Modal dialog box with Thread, to continue one process and showing the dialog box continuously. But as I am getting problem with thread I need to use Modeless dialog Box. But when I replace the code of Modal Dialog box with Modeless Dialog Box. It hangs when redrawn. i.e. When it redrawns nothing displays in the dialog box. The Code I am using is as follows My application is such, that continuously check the data from the server and displys on the dialog.
hDisOwnDlg=CreateDialog( g_hInst, MAKEINTRESOURCE( IDD_DISOWN ), NULL, DisOwnDlgProc );
ShowWindow(hDisOwnDlg,SW_SHOW);Please Help me. -- modified at 10:11 Thursday 1st November, 2007
[ Screen Capture ][ Tool Tip ]
Did you use of any function or event like WM_SIZE on your project? does your previous problem solve?
-
Did you use of any function or event like WM_SIZE on your project? does your previous problem solve?
No i am not using WM_SIZE. and my previos problem hasn't been solved.
[ Screen Capture ][ Tool Tip ]
-
Hi.. Previously I was using Modal dialog box with Thread, to continue one process and showing the dialog box continuously. But as I am getting problem with thread I need to use Modeless dialog Box. But when I replace the code of Modal Dialog box with Modeless Dialog Box. It hangs when redrawn. i.e. When it redrawns nothing displays in the dialog box. The Code I am using is as follows My application is such, that continuously check the data from the server and displys on the dialog.
hDisOwnDlg=CreateDialog( g_hInst, MAKEINTRESOURCE( IDD_DISOWN ), NULL, DisOwnDlgProc );
ShowWindow(hDisOwnDlg,SW_SHOW);Please Help me. -- modified at 10:11 Thursday 1st November, 2007
[ Screen Capture ][ Tool Tip ]
What thread are you creating the dialog on? What thread do you do the continuous checking on? Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
What thread are you creating the dialog on? What thread do you do the continuous checking on? Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
I have function that retrives the data from Internet Server throught Socket after some interval and show it on the dialog box. Previously I was using Modal Dialog box, calling this function through thread before creating dialog and termination thread when Dialog Ends. But I think if I will use the Modeless Dialog box the above thing will be much easy. And So replaced the code of modal dialog box with Modeless Dialog box. But as I told earlier it gets blank when it redrawns.
[ Screen Capture ][ Tool Tip ]
-
I have function that retrives the data from Internet Server throught Socket after some interval and show it on the dialog box. Previously I was using Modal Dialog box, calling this function through thread before creating dialog and termination thread when Dialog Ends. But I think if I will use the Modeless Dialog box the above thing will be much easy. And So replaced the code of modal dialog box with Modeless Dialog box. But as I told earlier it gets blank when it redrawns.
[ Screen Capture ][ Tool Tip ]
Mark Salsbery wrote:
What thread are you creating the dialog on? What thread do you do the continuous checking on?
Well if you're doing processing on the same thread the modeless dialog was created on, then that can cause the dialog not to get its WM_PAINT messages (and any others). Mark
Mark Salsbery Microsoft MVP - Visual C++ :java: