1
0

spage_assoc.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #ifndef WINAMP_ASSOCIATIONS_SETUP_PAGE_HEADER
  2. #define WINAMP_ASSOCIATIONS_SETUP_PAGE_HEADER
  3. #include "./ifc_setuppage.h"
  4. #include <commctrl.h>
  5. #define TYPE_CATEGORIES_NUM 5
  6. class setup_page_assoc : public ifc_setuppage
  7. {
  8. public:
  9. setup_page_assoc();
  10. virtual ~setup_page_assoc();
  11. public:
  12. size_t AddRef();
  13. size_t Release();
  14. HRESULT GetName(bool bShort, const wchar_t **pszName);
  15. HRESULT Save(HWND hwndText);
  16. HRESULT CreateView(HWND hwndParent, HWND *phwnd);
  17. HRESULT Revert(void);
  18. HRESULT IsDirty(void);
  19. HRESULT Validate(void);
  20. protected:
  21. INT_PTR PageDlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
  22. INT_PTR OnInitDialog(HWND hwndFocus, LPARAM lParam);
  23. void OnDestroy(void);
  24. void OnSize(UINT nType, INT cx, INT cy);
  25. void OnCommand(INT nCtrlID, INT nEvntID, HWND hwndCtrl);
  26. BOOL OnNotify(INT nCtrlID, NMHDR *pnmh, LRESULT *pResult);
  27. BOOL TreeView_OnClick(NMHDR *pnmh);
  28. void TreeView_OnItemStateClick(HWND hwndTree, HTREEITEM hItem);
  29. BOOL TreeView_OnKeyDown(NMTVKEYDOWN *ptvkd);
  30. INT TreeView_OnCustomDraw(NMTVCUSTOMDRAW *ptvcd);
  31. void UpdateUI(void);
  32. private:
  33. size_t ref;
  34. HWND hwnd;
  35. wchar_t *pszTypes;
  36. WORD *pMeta;
  37. BYTE expanded[TYPE_CATEGORIES_NUM];
  38. wchar_t szTopExt[32];
  39. wchar_t szCaretExt[32];
  40. BOOL bRegCD;
  41. BOOL bAgent;
  42. BOOL bExplorerMenu;
  43. protected:
  44. friend static INT_PTR WINAPI DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  45. RECVS_DISPATCH;
  46. };
  47. #endif //WINAMP_ASSOCIATIONS_SETUP_PAGE_HEADER