1 #ifndef _RESOURCE_EXPORT_DLG_
2 #define _RESOURCE_EXPORT_DLG_
3 
4 #define CUSTOM_TV_STATE_UNCHECKED          1
5 #define CUSTOM_TV_STATE_CHECKED            2
6 #define CUSTOM_TV_STATE_PARTIAL_CHECKED    3
7 
8 class CustomTreeCtrl : public CTreeCtrl
9 {
10 public:
CustomTreeCtrl()11     CustomTreeCtrl(){};
~CustomTreeCtrl()12     ~CustomTreeCtrl(){};
13     afx_msg void OnNMClick(NMHDR *pNMHDR, LRESULT *pResult);
14     afx_msg void OnTvnKeydown(NMHDR* pNMHDR, LRESULT* pResult);
15     afx_msg void OnNodeSelect(NMHDR* ph, LRESULT* pr);
16     UINT GetItemCheckState(HTREEITEM hItem);
17     DECLARE_MESSAGE_MAP()
18 
19 public:
20     CImageList mImageList;
21 
22 public:
23     void InitImageList();
24     void SelectAllChildren(HTREEITEM hParent, BOOL bFlag);
25     UINT GetChildrenState(HTREEITEM hParent);
26     void SetItemState(HTREEITEM hItem, int state);
27     HTREEITEM FindItem(HTREEITEM hStart, CString text);
28     void UpdateParentState(HTREEITEM hItem);
29     void UpdateChildrenState(HTREEITEM hItem);
30     void OnSelectItem(HTREEITEM hItem);
31 };
32 
33 
34 //resource export dialog
35 
36 class resource_export_dlg : public express_dialog
37 {
38     DECLARE_DYNAMIC(resource_export_dlg)
39     DECLARE_MESSAGE_MAP()
40 public:
41     resource_export_dlg(CWnd* pParent = NULL);   // standard constructor
42     virtual ~resource_export_dlg();
43     virtual void DoDataExchange(CDataExchange* pDX);
44     virtual BOOL OnInitDialog();
45     afx_msg void OnBnClickedOk();
46     afx_msg void OnBnClickedCustomResource();
47     afx_msg void OnSelectSRecord();
48     afx_msg void OnSelectBinary();
49     LRESULT OnTestMessage(WPARAM wParam, LPARAM lParam);
50     virtual BOOL PreTranslateMessage(MSG* pMsg);
51     enum { IDD = IDD_RES_EXPORT };
52 
53 protected:
54     void ShowHideMemoryOffset();
55     void PopulateResourceTree();
56     void SaveChecks();
57     void AddDisplays(HTREEITEM hParent);
58     void AddLanguages(HTREEITEM hParent, int display_index);
59     void SaveDisplayChecks(HTREEITEM hParent);
60     void SaveLanguageChecks(HTREEITEM hParent, int display_index);
61     BOOL b_modified;
62 
63 protected:
64     CustomTreeCtrl  mResView;
65 };
66 #endif