PFM.h
上传用户:wymy58
上传日期:2007-01-07
资源大小:2086k
文件大小:3k
源码类别:

DirextX编程

开发平台:

Visual C++

  1. // PFM.h : main header file for the PFM application
  2. //
  3. #if !defined(AFX_PFM_H__F66466D9_C4B7_11D2_BF7C_0080C8E05391__INCLUDED_)
  4. #define AFX_PFM_H__F66466D9_C4B7_11D2_BF7C_0080C8E05391__INCLUDED_
  5. #if _MSC_VER > 1000
  6. #pragma once
  7. #endif // _MSC_VER > 1000
  8. #ifndef __AFXWIN_H__
  9. #error include 'stdafx.h' before including this file for PCH
  10. #endif
  11. #include "resource.h"       // main symbols
  12. #define gApp ((CPFMApp*)AfxGetApp())
  13. #define gMainWnd ((CMainFrame*)AfxGetMainWnd())
  14. #define gLeftPan ((CMainFrame*)AfxGetMainWnd())->GetLeftPan()
  15. #define gRightPan ((CMainFrame*)AfxGetMainWnd())->GetRightPan()
  16. #define gOptions ((CPFMApp*)AfxGetApp())->m_options
  17. #define gCurPan ((CPFMApp*)AfxGetApp())->m_options.m_nCurrentPan
  18. #define gLeftPath ((CPFMApp*)AfxGetApp())->m_options.m_strStartPathLeft
  19. #define gRightPath ((CPFMApp*)AfxGetApp())->m_options.m_strStartPathRight
  20. #define gImageList ((CMainFrame*)AfxGetMainWnd())->GetImageList()
  21. int Compare(const void*  p1, const void*  p2);
  22. class COptions
  23. {
  24. public:
  25. COptions();
  26. ~COptions();
  27. VOID GetDefaultSetting();
  28. BOOL LoadOptions(LPCTSTR lpszPath = NULL);
  29. BOOL SaveOptions(LPCTSTR lpszPath = NULL);
  30. public:
  31. // [Desktop] section
  32. int m_nCurrentPan; // 0 means left, and 1 means right
  33. // [Configuration] section
  34. // [left] section
  35. CString m_strStartPathLeft; // The start up path of left panel
  36. int m_nShowLeft; // Determine whether show left 
  37. // file list or not, for later use
  38. int m_nSortColLeft; // Sort column
  39. int m_nSortOrderLeft; // Sort Order, ascend or descend
  40. // [right] section
  41. CString m_strStartPathRight;
  42. int m_nShowRight; // For later use
  43. int m_nSortColRight;
  44. int m_nSortOrderRight;
  45. // [Colors] section
  46. int m_nUseBackColorSelected;
  47. COLORREF m_crBackColorSelected;
  48. COLORREF m_crForeColorSelected;
  49. int m_nUseBackColorFocused;
  50. COLORREF m_crBackColorFocused;
  51. COLORREF m_crForeColorFocused;
  52. COLORREF m_crForeColorNormal;
  53. };
  54. /////////////////////////////////////////////////////////////////////////////
  55. // CPFMApp:
  56. // See PFM.cpp for the implementation of this class
  57. //
  58. class CPFMApp : public CWinApp
  59. {
  60. public:
  61. CPFMApp();
  62. public:
  63. COptions m_options;
  64. // Overrides
  65. // ClassWizard generated virtual function overrides
  66. //{{AFX_VIRTUAL(CPFMApp)
  67. public:
  68. virtual BOOL InitInstance();
  69. //}}AFX_VIRTUAL
  70. // Implementation
  71. public:
  72. //{{AFX_MSG(CPFMApp)
  73. afx_msg void OnAppAbout();
  74. afx_msg void OnTab();
  75. afx_msg void OnReturn();
  76. afx_msg void OnChgdrvleft();
  77. afx_msg void OnChgdrvright();
  78. afx_msg void OnCopyfiles();
  79. afx_msg void OnDelfiles();
  80. afx_msg void OnMovefiles();
  81. afx_msg void OnMkdir();
  82. afx_msg void OnPackfiles();
  83. afx_msg void OnSelfiles();
  84. afx_msg void OnSelreverse();
  85. afx_msg void OnDeselfiles();
  86. //}}AFX_MSG
  87. DECLARE_MESSAGE_MAP()
  88. };
  89. /////////////////////////////////////////////////////////////////////////////
  90. //{{AFX_INSERT_LOCATION}}
  91. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  92. #endif // !defined(AFX_PFM_H__F66466D9_C4B7_11D2_BF7C_0080C8E05391__INCLUDED_)