반응형

http://sehwa4444.egloos.com/2728018



다이얼로그에는 OnIdle은 없지만 내부적으로 UI업데이트를 위한 WM_KICKIDLE 메시지를 가지고 있다
WM_KICKIDLE 메세지는 UNDOCUMENT 메세지로 idle상태일때 보내지는 메세지며 위자드에서 지원하지 않기 때문에 직접 넣어줘야한다.

 
// -- DMyDlg.h --

#include <afxpriv.h>


CMyDialog : public CDialog
{
...
protected:
   ... // other message handler
   afx_msg LRESULT OnKickIdle(WPARAM wParam, LPARAM lParam);
   ...
};

 


// -- DMyDlg.cpp --

BEGIN_MESSAGE_MAP(CMyDialog, CDialog)
    //{{AFX_MSG_MAP(CMyDialog)
    ON_MESSAGE(WM_KICKIDLE, OnKickIdle)
    //}}AFX_MSG_MAP
END_MESSAGE_MAP()

LRESULT CMyDialog::OnKickIdle(WPARAM wParam, LPARAM lParam)
{
   UpdateDialogControls(this, FALSE);


   return (LRESULT)1;
}

반응형

+ Recent posts