1 // MainDlg.h : interface of the CMainDlg class
3 /////////////////////////////////////////////////////////////////////////////
7 #include "gdipp_demo/resource.h"
9 class CMainDlg
: public CDialogImpl
<CMainDlg
>, public CUpdateUI
<CMainDlg
>,
10 public CMessageFilter
, public CIdleHandler
13 enum { IDD
= IDD_MAINDLG
};
15 virtual BOOL
PreTranslateMessage(MSG
* pMsg
);
16 virtual BOOL
OnIdle();
18 BEGIN_UPDATE_UI_MAP(CMainDlg
)
21 BEGIN_MSG_MAP(CMainDlg
)
22 MESSAGE_HANDLER(WM_INITDIALOG
, OnInitDialog
)
23 MESSAGE_HANDLER(WM_CLOSE
, OnClose
)
24 MESSAGE_HANDLER(WM_DESTROY
, OnDestroy
)
25 COMMAND_ID_HANDLER(ID_APP_EXIT
, OnFileExit
)
26 COMMAND_ID_HANDLER(ID_TOOLS_LOAD
, OnToolsLoad
)
27 COMMAND_ID_HANDLER(ID_TOOLS_UNLOAD
, OnToolsUnload
)
28 COMMAND_ID_HANDLER(ID_APP_ABOUT
, OnAppAbout
)
31 // Handler prototypes (uncomment arguments if needed):
32 // LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
33 // LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
34 // LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)
36 LRESULT
OnInitDialog(UINT
/*uMsg*/, WPARAM
/*wParam*/, LPARAM
/*lParam*/, BOOL
& /*bHandled*/);
37 LRESULT
OnClose(UINT
/*uMsg*/, WPARAM wParam
, LPARAM
/*lParam*/, BOOL
& /*bHandled*/);
38 LRESULT
OnDestroy(UINT
/*uMsg*/, WPARAM
/*wParam*/, LPARAM
/*lParam*/, BOOL
& /*bHandled*/);
39 LRESULT
OnFileExit(WORD
/*wNotifyCode*/, WORD wID
, HWND
/*hWndCtl*/, BOOL
& /*bHandled*/);
40 LRESULT
OnToolsLoad(WORD
/*wNotifyCode*/, WORD wID
, HWND
/*hWndCtl*/, BOOL
& /*bHandled*/);
41 LRESULT
OnToolsUnload(WORD
/*wNotifyCode*/, WORD wID
, HWND
/*hWndCtl*/, BOOL
& /*bHandled*/);
42 LRESULT
OnAppAbout(WORD
/*wNotifyCode*/, WORD
/*wID*/, HWND
/*hWndCtl*/, BOOL
& /*bHandled*/);
44 void CloseDialog(int nVal
);
47 void update_menu_state();