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.

120 lines
3.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation 1996-2001.
  5. //
  6. // File: uithread.h
  7. //
  8. // Contents: definition of CUIThread
  9. //
  10. //----------------------------------------------------------------------------
  11. #if !defined(AFX_UITHREAD_H__69D140AE_B23D_11D1_AB7B_00C04FB6C6FA__INCLUDED_)
  12. #define AFX_UITHREAD_H__69D140AE_B23D_11D1_AB7B_00C04FB6C6FA__INCLUDED_
  13. #if _MSC_VER >= 1000
  14. #pragma once
  15. #endif // _MSC_VER >= 1000
  16. #include "attr.h"
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CUIThread thread
  19. #define DLG_KEY_PRIMARY(x) ( (PtrToUlong((PVOID)(x))) & 0x00FFFFFF )
  20. #define DLG_KEY_SECONDARY(x) ( (PtrToUlong((PVOID)(x)) << 24 ) & 0xFF000000 )
  21. #define DLG_KEY( x, y ) (LONG_PTR)( DLG_KEY_PRIMARY( x ) | DLG_KEY_SECONDARY(y) )
  22. class CUIThread : public CWinThread
  23. {
  24. DECLARE_DYNCREATE(CUIThread)
  25. protected:
  26. CUIThread(); // protected constructor used by dynamic creation
  27. // Attributes
  28. public:
  29. // Operations
  30. public:
  31. // Overrides
  32. // ClassWizard generated virtual function overrides
  33. //{{AFX_VIRTUAL(CUIThread)
  34. public:
  35. virtual BOOL InitInstance();
  36. virtual int ExitInstance();
  37. virtual BOOL PreTranslateMessage(MSG* pMsg);
  38. //}}AFX_VIRTUAL
  39. // Implementation
  40. protected:
  41. virtual ~CUIThread();
  42. // Generated message map functions
  43. //{{AFX_MSG(CUIThread)
  44. // NOTE - the ClassWizard will add and remove member functions here.
  45. //}}AFX_MSG
  46. afx_msg void OnApplyProfile( WPARAM, LPARAM );
  47. afx_msg void OnAssignProfile( WPARAM, LPARAM );
  48. afx_msg void OnAnalyzeProfile( WPARAM, LPARAM );
  49. afx_msg void OnDescribeProfile( WPARAM, LPARAM );
  50. afx_msg void OnDescribeLocation( WPARAM, LPARAM );
  51. afx_msg void OnDestroyDialog(WPARAM, LPARAM);
  52. afx_msg void OnNewConfiguration(WPARAM, LPARAM);
  53. afx_msg void OnAddPropSheet(WPARAM, LPARAM);
  54. DECLARE_MESSAGE_MAP()
  55. void DefaultLogFile(CComponentDataImpl *pCDI,GWD_TYPES LogType,LPCTSTR szBase, CString& strLogFile);
  56. private:
  57. CList<HWND,HWND> m_PSHwnds;
  58. };
  59. // this class is created for modeless dialog's thread inside MMC
  60. class CModelessDlgUIThread : public CUIThread
  61. {
  62. DECLARE_DYNCREATE(CModelessDlgUIThread)
  63. protected:
  64. CModelessDlgUIThread(); // protected constructor used by dynamic creation
  65. // Operations
  66. public:
  67. virtual ~CModelessDlgUIThread();
  68. void WaitTillRun();
  69. // Overrides
  70. // ClassWizard generated virtual function overrides
  71. //{{AFX_VIRTUAL(CModelessDlgUIThread)
  72. public:
  73. virtual int Run( );
  74. //}}AFX_VIRTUAL
  75. // Generated message map functions
  76. //{{AFX_MSG(CModelessDlgUIThread)
  77. // NOTE - the ClassWizard will add and remove member functions here.
  78. //}}AFX_MSG
  79. afx_msg void OnCreateModelessSheet(WPARAM, LPARAM);
  80. afx_msg void OnDestroyWindow(WPARAM, LPARAM);
  81. DECLARE_MESSAGE_MAP()
  82. private:
  83. HANDLE m_hReadyForMsg;
  84. };
  85. /////////////////////////////////////////////////////////////////////////////
  86. //{{AFX_INSERT_LOCATION}}
  87. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  88. #define SCEM_APPLY_PROFILE (WM_APP+2)
  89. #define SCEM_ASSIGN_PROFILE (WM_APP+3)
  90. #define SCEM_ANALYZE_PROFILE (WM_APP+4)
  91. #define SCEM_DESCRIBE_PROFILE (WM_APP+6)
  92. #define SCEM_DESCRIBE_LOCATION (WM_APP+7)
  93. #define SCEM_DESTROY_DIALOG (WM_APP+8)
  94. #define SCEM_NEW_CONFIGURATION (WM_APP+9)
  95. #define SCEM_ADD_PROPSHEET (WM_APP+10)
  96. #define SCEM_DESTROY_SCOPE_DIALOG (WM_APP+11)
  97. #define SCEM_CREATE_MODELESS_SHEET (WM_APP+12)
  98. #define SCEM_DESTROY_WINDOW (WM_APP+13)
  99. #endif // !defined(AFX_UITHREAD_H__69D140AE_B23D_11D1_AB7B_00C04FB6C6FA__INCLUDED_)