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.

88 lines
1.9 KiB

  1. //*******************************************************************************************
  2. //
  3. // Filename : Dlg.h
  4. //
  5. // Definitions of CDlg, CFileDlg and CPropPage
  6. //
  7. // Copyright (c) 1994 - 1996 Microsoft Corporation. All rights reserved
  8. //
  9. //*******************************************************************************************
  10. #ifndef _Dlg_H_
  11. #define _Dlg_H_
  12. class CDlg
  13. {
  14. public:
  15. CDlg() {}
  16. ~CDlg() {}
  17. int DoModal(UINT idRes, HWND hParent);
  18. HWND DoModeless(UINT idRes, HWND hParent);
  19. protected:
  20. static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  21. HWND m_hDlg;
  22. private:
  23. virtual INT_PTR RealDlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
  24. } ;
  25. #ifdef UNICODE
  26. #define tagOFN tagOFNW
  27. #else // UNICODE
  28. #define tagOFN tagOFNA
  29. #endif // UNICODE
  30. class CFileDlg : public tagOFN
  31. {
  32. public:
  33. CFileDlg(HWND hwndParent, LPCTSTR szFilter, LPTSTR szFile, UINT uFileLen, LPCTSTR szTitle);
  34. ~CFileDlg() {}
  35. DWORD GetDlgError() {return(m_dwError);}
  36. protected:
  37. DWORD m_dwError;
  38. HWND m_hDlg;
  39. static UINT_PTR CALLBACK HookProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  40. private:
  41. virtual UINT_PTR RealHookProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
  42. } ;
  43. class CFileOpenDlg : public CFileDlg
  44. {
  45. public:
  46. CFileOpenDlg(HWND hwndParent, LPCTSTR szFilter, LPTSTR szFile, UINT uFileLen, LPCTSTR szTitle)
  47. : CFileDlg(hwndParent, szFilter, szFile, uFileLen, szTitle) {}
  48. ~CFileOpenDlg() {}
  49. BOOL DoModal();
  50. } ;
  51. class CPropPage : public PROPSHEETPAGE
  52. {
  53. public:
  54. CPropPage(LPCTSTR szTmplt);
  55. virtual ~CPropPage();
  56. HRESULT DoModeless(LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam);
  57. protected:
  58. static INT_PTR CALLBACK PageProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  59. HWND m_hPage;
  60. private:
  61. static UINT CALLBACK PageRelease(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp);
  62. virtual INT_PTR RealPageProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
  63. CPropPage *m_pThis;
  64. } ;
  65. #endif // _Dlg_H_