Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.8 KiB

  1. #ifndef FTPROP_H
  2. #define FTPROP_H
  3. #include "ftdlg.h"
  4. class CFTPropDlg : public CFTDlg
  5. {
  6. public:
  7. CFTPropDlg();
  8. ///////////////////////////////////////////////////////////////////////////////
  9. // Implementation
  10. private:
  11. // Message handlers
  12. LRESULT WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
  13. // Dialog messages
  14. LRESULT OnCommand(WPARAM wParam, LPARAM lParam);
  15. LRESULT OnInitDialog(WPARAM wParam, LPARAM lParam);
  16. LRESULT OnFinishInitDialog();
  17. LRESULT OnNotify(WPARAM wParam, LPARAM lParam);
  18. LRESULT OnDestroy(WPARAM wParam, LPARAM lParam);
  19. // Misc
  20. LRESULT OnCtlColorStatic(WPARAM wParam, LPARAM lParam);
  21. // Control specific
  22. // ListView
  23. LRESULT OnNotifyListView(UINT uCode, LPNMHDR pNMHDR);
  24. LRESULT OnListViewSelItem(int iItem, LPARAM lParam);
  25. LRESULT OnListViewColumnClick(int iCol);
  26. // New, Remove, Edit buttons
  27. LRESULT OnNewButton(WORD wNotif);
  28. LRESULT OnDeleteButton(WORD wNotif);
  29. LRESULT OnRemoveButton(WORD wNotif);
  30. LRESULT OnEditButton(WORD wNotif);
  31. LRESULT OnAdvancedButton(WORD wNotif);
  32. LRESULT OnChangeButton(WORD wNotif);
  33. // Misc
  34. BOOL _GetListViewSelectedItem(UINT uMask, UINT uStateMask, LVITEM* plvItem);
  35. // Member variables
  36. private:
  37. HIMAGELIST _hImageList;
  38. BOOL _fPerUserAdvButton;
  39. BOOL _fStopThread;
  40. BOOL _fUpdateImageAgain;
  41. // Optimization
  42. int _iLVSel;
  43. ///////////////////////////////////////////////////////////////////////////////
  44. // Helpers
  45. private:
  46. // General
  47. inline HWND _GetLVHWND();
  48. // Lower pane
  49. HRESULT _UpdateProgIDButtons(LPTSTR pszExt, LPTSTR pszProgID);
  50. HRESULT _UpdateGroupBox(LPTSTR pszExt, BOOL fExt);
  51. HRESULT _UpdateDeleteButton(BOOL fExt);
  52. HRESULT _UpdateOpensWith(LPTSTR pszExt, LPTSTR pszProgID);
  53. HRESULT _UpdateAdvancedText(LPTSTR pszExt, LPTSTR pszFileType, BOOL fExt);
  54. HRESULT _EnableLowerPane(BOOL fEnable = TRUE);
  55. // ListView
  56. HRESULT _InitListView();
  57. HRESULT _FillListView();
  58. HRESULT _SelectListViewItem(int i);
  59. HRESULT _DeleteListViewItem(int i);
  60. void _UpdateListViewItem(LVITEM* plvItem);
  61. HRESULT _InitPreFillListView();
  62. HRESULT _InitPostFillListView();
  63. DWORD _UpdateAllListViewItemImages();
  64. void _SetAdvancedRestoreButtonHelpID(DWORD dwID);
  65. int _GetNextNAItemPos(int iFirstNAItem, int cNAItem, LPTSTR pszProgIDDescr);
  66. static DWORD WINAPI _UpdateAllListViewItemImagesWrapper(LPVOID lpParameter);
  67. static DWORD WINAPI _FillListViewWrapper(LPVOID lpParameter);
  68. static DWORD WINAPI _ThreadAddRefCallBack(LPVOID lpParameter);
  69. int _InsertListViewItem(int iItem, LPTSTR pszExt, LPTSTR pszProgIDDescr, LPTSTR pszProgID = NULL);
  70. BOOL _ShouldEnableButtons();
  71. };
  72. #endif //FTPROP_H