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.

70 lines
2.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: GenericWnd.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of GenericWnd.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __WND__H__INCLUDED__
  15. #define __WND__H__INCLUDED__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. class CGenericWnd
  20. {
  21. public:
  22. CGenericWnd();
  23. virtual ~CGenericWnd();
  24. public:
  25. operator HWND() const { return m_hWnd; }
  26. public:
  27. virtual LONG GetWindowLong( int nIndex );
  28. virtual BOOL ShowWindow( int nCmdShow );
  29. virtual BOOL DestroyWindow();
  30. virtual BOOL GetClientRect( LPRECT );
  31. virtual HWND GetSafeHwnd() { return m_hWnd; }
  32. virtual BOOL MoveWindow( int x, int y, int nWidth, int nHeight, BOOL bRepaint );
  33. virtual BOOL MoveWindow( LPRECT pRect, BOOL bRepaint );
  34. virtual BOOL SetWindowText( LPCTSTR lpString );
  35. virtual BOOL InvalidateRect( LPCRECT lpRect, BOOL bErase );
  36. protected:
  37. virtual BOOL Create( LPCTSTR, LPCTSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE );
  38. virtual BOOL CreateEx( DWORD, LPCTSTR, LPCTSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE );
  39. protected:
  40. static BOOL RegisterClass( LPCTSTR lpszClassName, HINSTANCE hInstance, UINT style = CS_HREDRAW|CS_VREDRAW, HCURSOR hCursor = LoadCursor( NULL, IDC_ARROW ), HICON hIcon = LoadIcon( NULL, IDI_APPLICATION ), HBRUSH hbrBackground = NULL, LPCTSTR lpszMenuName = NULL, int cbClsExtra = 0, int cbWndExtra = 0 );
  41. static BOOL RegisterClassEx( LPCTSTR lpszClassName, HINSTANCE hInstance, UINT style = CS_HREDRAW|CS_VREDRAW, HCURSOR hCursor = LoadCursor( NULL, IDC_ARROW ), HICON hIcon = LoadIcon( NULL, IDI_APPLICATION ), HBRUSH hbrBackground = NULL, LPCTSTR lpszMenuName = NULL, int cbClsExtra = 0, int cbWndExtra = 0, HICON hIconSm = NULL );
  42. protected:
  43. virtual LRESULT WindowProc( UINT, WPARAM, LPARAM );
  44. protected:
  45. virtual LRESULT OnKeyDown( WPARAM, LPARAM );
  46. virtual LRESULT OnCommand( WPARAM, LPARAM );
  47. virtual LRESULT OnClose( WPARAM, LPARAM );
  48. virtual LRESULT OnPaint( WPARAM, LPARAM );
  49. virtual LRESULT OnDestroy( WPARAM, LPARAM );
  50. virtual LRESULT OnDisplayChange( WPARAM, LPARAM );
  51. virtual LRESULT OnDevModeChange( WPARAM, LPARAM );
  52. virtual LRESULT OnSize( WPARAM, LPARAM );
  53. private:
  54. static LRESULT CALLBACK WindowProc( HWND, UINT, WPARAM, LPARAM );
  55. private:
  56. HWND m_hWnd;
  57. };
  58. #endif