Problem to refresh modeless dialog 
Author Message
 Problem to refresh modeless dialog

Hi every body,

During long processing, i display a modeless dialog like this :

 CModelessDlg * DlgAttente;                           // CModelessDlg is my
class
 DlgAttente = new CModelessDlg;
 DlgAttente->Create(IDD_DIALOG_ATTENTE,this);
 DlgAttente->ShowWindow(SW_SHOW);
 DlgAttente->m_Message="Please wait, processing is being......";
 DlgAttente->UpdateData(FALSE);

m_message is a variable bind to CStatic control ( label ). It shows my
messages.

This code work well, but if i display another window, for example, windows
explorer, Bloc Notes, then close it, my modeless dialog don't refresh. The
message show on it by my CStatic disappear without trace.

Can anybody help me ??

Thanks in advance



Mon, 10 Feb 2003 03:00:00 GMT  
 Problem to refresh modeless dialog

Cheickna:

IMO, it is much easier to do long processing in a worker thread. That
way, the main thread can handle all the GUI, and in particular update
itself if it is covered and uncovered.

HTH,

David Wilkinson

===============

Quote:

> Hi every body,

> During long processing, i display a modeless dialog like this :

>  CModelessDlg * DlgAttente;                           // CModelessDlg is my
> class
>  DlgAttente = new CModelessDlg;
>  DlgAttente->Create(IDD_DIALOG_ATTENTE,this);
>  DlgAttente->ShowWindow(SW_SHOW);
>  DlgAttente->m_Message="Please wait, processing is being......";
>  DlgAttente->UpdateData(FALSE);

> m_message is a variable bind to CStatic control ( label ). It shows my
> messages.

> This code work well, but if i display another window, for example, windows
> explorer, Bloc Notes, then close it, my modeless dialog don't refresh. The
> message show on it by my CStatic disappear without trace.

> Can anybody help me ??

> Thanks in advance



Mon, 10 Feb 2003 03:00:00 GMT  
 Problem to refresh modeless dialog
Well you should get a WM_PAINT for your dialog when the covering window is
closed so do an UpdateData(FALSE) in your WM_PAINT handler.


Quote:
> Hi every body,

> During long processing, i display a modeless dialog like this :

>  CModelessDlg * DlgAttente;                           // CModelessDlg is
my
> class
>  DlgAttente = new CModelessDlg;
>  DlgAttente->Create(IDD_DIALOG_ATTENTE,this);
>  DlgAttente->ShowWindow(SW_SHOW);
>  DlgAttente->m_Message="Please wait, processing is being......";
>  DlgAttente->UpdateData(FALSE);

> m_message is a variable bind to CStatic control ( label ). It shows my
> messages.

> This code work well, but if i display another window, for example, windows
> explorer, Bloc Notes, then close it, my modeless dialog don't refresh. The
> message show on it by my CStatic disappear without trace.

> Can anybody help me ??

> Thanks in advance



Mon, 10 Feb 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Forced Refresh of CEdit in Modeless Dialog

2. How to refresh/update modeless dialog box appearance..?

3. Refreshing Modeless dialogs, how?

4. Problem using MFC modal dialog with long animation refresh

5. Dialog refresh problem using Automation

6. Modeless dialog shall not be modeless !

7. Q: tabbing not possible in modeless propertysheet / modeless dialog

8. Modeless property sheet in a modeless dialog box

9. Refresh one Dialog after pressing OK in an other dialog

10. Problem with TAB control and a MODELESS dialog in a ATL COM DLL

11. Problem with TAB control and a MODELESS dialog in a ATL COM DLL

12. Problems with threads and modeless dialog boxes

 

 
Powered by phpBB® Forum Software