Old fashion design for PC-104
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.

61 lines
1.6 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: PanelWnd.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of PanelWnd.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __PANEL__WND__H__INCLUDED__
  15. #define __PANEL__WND__H__INCLUDED__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. class CPanelWnd : public CWnd
  20. {
  21. public:
  22. CPanelWnd();
  23. virtual ~CPanelWnd();
  24. public:
  25. virtual BOOL Create( CWnd *pParentWnd, int x, int y, int nWidth, int nHeight );
  26. virtual BOOL Create( CWnd *pParentWnd, CRect *pRect );
  27. virtual BOOL PlaceChildCenter( CWnd *pChildWnd );
  28. virtual BOOL PlaceChildFit( CWnd *pChildWnd, double dAspect );
  29. virtual BOOL PlaceChild( CWnd *pChildWnd );
  30. public:
  31. //{{AFX_VIRTUAL(CPanelWnd)
  32. public:
  33. virtual BOOL DestroyWindow();
  34. //}}AFX_VIRTUAL
  35. protected:
  36. //{{AFX_MSG(CPanelWnd)
  37. afx_msg void OnSize(UINT nType, int cx, int cy);
  38. afx_msg void OnSizing(UINT fwSide, LPRECT pRect);
  39. afx_msg void OnTimer(UINT nIDEvent);
  40. afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
  41. //}}AFX_MSG
  42. DECLARE_MESSAGE_MAP()
  43. protected:
  44. void FitChildWindow();
  45. protected:
  46. void CenterChildWindow();
  47. void ScaleChildWindow();
  48. CWnd *m_pChildWnd;
  49. double m_dAspect;
  50. enum { PN_NONE, PM_FIT, PM_CENTER, PM_SCALE };
  51. int m_nMode;
  52. };
  53. //{{AFX_INSERT_LOCATION}}
  54. #endif