Leaked source code of windows server 2003
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.

69 lines
1.9 KiB

  1. #ifndef FTEDIT_H
  2. #define FTEDIT_H
  3. #include "ftdlg.h"
  4. typedef struct tagFTEDITPARAM
  5. {
  6. TCHAR szExt[MAX_EXT];
  7. DWORD dwExt;
  8. TCHAR szProgIDDescr[MAX_PROGIDDESCR];
  9. DWORD dwProgIDDescr;
  10. TCHAR szProgID[MAX_PROGID];
  11. DWORD dwProgID;
  12. } FTEDITPARAM;
  13. class CFTEditDlg : public CFTDlg
  14. {
  15. public:
  16. CFTEditDlg(FTEDITPARAM* pftEditParam);
  17. protected:
  18. ~CFTEditDlg();
  19. ///////////////////////////////////////////////////////////////////////////////
  20. // Implementation
  21. private:
  22. // Message handlers
  23. //Dialog messages
  24. LRESULT OnCommand(WPARAM wParam, LPARAM lParam);
  25. LRESULT OnInitDialog(WPARAM wParam, LPARAM lParam);
  26. LRESULT OnOK(WORD wNotif);
  27. LRESULT OnCancel(WORD wNotif);
  28. LRESULT OnDestroy(WPARAM wParam, LPARAM lParam);
  29. //Control specific
  30. LRESULT OnAdvancedButton(WORD wNotif);
  31. LRESULT OnEdit(WORD wNotif);
  32. LRESULT OnTimer(UINT nTimer);
  33. // Misc
  34. LRESULT WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
  35. // Member variables
  36. private:
  37. int _iLVSel;
  38. BOOL _fAdvanced;
  39. UINT_PTR _nTimer;
  40. HANDLE _hHeapProgID;
  41. FTEDITPARAM* _pftEditParam;
  42. ///////////////////////////////////////////////////////////////////////////////
  43. // Helpers
  44. private:
  45. HRESULT _GetProgIDDescrFromExt(LPTSTR pszExt, LPTSTR pszProgIDDescr,
  46. DWORD* pcchProgIDDescr);
  47. HRESULT _GetProgIDInfo(IAssocInfo* pAI, LPTSTR pszProgID, DWORD* pcchProgID,
  48. BOOL* pfNewProgID, BOOL* pfExplicitNew);
  49. HRESULT _HandleProgIDAssoc(IAssocInfo* pAI, LPTSTR pszExt, BOOL fExtExist);
  50. HRESULT _ProgIDComboHelper();
  51. void _ResizeDlg();
  52. HRESULT _FillProgIDDescrCombo();
  53. BOOL _SelectProgIDDescr(LPTSTR pszProgIDDescr);
  54. void _ConfigureDlg();
  55. LPTSTR _AddProgID(LPTSTR pszProgID);
  56. void _CleanupProgIDs();
  57. };
  58. #endif //FTEDIT_H