Simple dialog countdown procedure, form only Static Text (ID: IDC_STATIC1) and Progress Control two controls, the countdown 60 seconds! The Static Text display number 60,59,58... . The Progress shows Progress Control
In the thread, use the The CWnd * h_d2=AfxGetApp () - & gt; GetMainWnd (); H_d2 - & gt; GetDlgItem (IDC_STATIC1) - & gt; SetWindowTextW (_T (" countdown: ")) to update the Static Text normal But using h_d2 - & gt; GetDlgItem (IDC_PROGRESS1) - & gt; SetRange (0 ') cannot, can you tell me, what reason?
Small white just contact MFC consult!
CodePudding user response:
Let dialog to update data, not in a thread interface
CodePudding user response:
GetDlgItem (IDC_PROGRESS1) - & gt; SetRange (0 '); In the dialog initialization