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.

51 lines
1.3 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 19/04/2000
  5. // Last modification: 08/10/2003
  6. // Project Intruder Position Indicator
  7. // SUBSYSTEM: Dialog
  8. // FILE: Dialog.h
  9. // AUTHOR: Chizhevskiy Sergey
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of class CDialog
  13. //----------------------------------------------------------------------------
  14. #ifndef __DIALOG__H__INCLUDED__
  15. #define __DIALOG__H__INCLUDED__
  16. class CDialog
  17. {
  18. public:
  19. CDialog(LPCTSTR lpTemplateName);
  20. virtual ~CDialog();
  21. public:
  22. BOOL Create( HWND hParent = NULL, BOOL bThread = FALSE );
  23. void Destroy();
  24. BOOL DoModal( HWND hParent = NULL, BOOL bThread = FALSE );
  25. operator HWND() { return m_hWnd; }
  26. protected:
  27. virtual BOOL DialogProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) = 0;
  28. virtual DWORD ThreadProc();
  29. private:
  30. friend BOOL CALLBACK DialogProcDialog( HWND, UINT, WPARAM, LPARAM );
  31. friend DWORD CALLBACK ThreadProcDialog( LPVOID lpvParam )
  32. { return ((CDialog*)lpvParam)->ThreadProc(); }
  33. protected:
  34. HINSTANCE m_hInstance;
  35. LPCTSTR m_pTemplateName;
  36. HANDLE m_hThread;
  37. DWORD m_dwThreadId;
  38. HWND m_hWnd;
  39. HWND m_hParent;
  40. BOOL m_bModal;
  41. };
  42. #endif