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.

223 lines
4.7 KiB

  1. //Copyright (c) 1998 - 1999 Microsoft Corporation
  2. /*++
  3. Module Name:
  4. MainFrm.h
  5. Abstract:
  6. This Module defines the CMainFrame(The Frame Window of the application) class
  7. Author:
  8. Arathi Kundapur (v-akunda) 11-Feb-1998
  9. Revision History:
  10. --*/
  11. #if !defined(AFX_MAINFRM_H__72451C6F_887E_11D1_8AD1_00C04FB6CBB5__INCLUDED_)
  12. #define AFX_MAINFRM_H__72451C6F_887E_11D1_8AD1_00C04FB6CBB5__INCLUDED_
  13. #if _MSC_VER >= 1000
  14. #endif // _MSC_VER >= 1000
  15. #include "lrwizapi.h"
  16. class CLicServer;
  17. class CKeyPack;
  18. class CMainFrame : public CFrameWnd
  19. {
  20. protected: // create from serialization only
  21. CMainFrame();
  22. DECLARE_DYNCREATE(CMainFrame)
  23. // Attributes
  24. public:
  25. // Operations
  26. public:
  27. // Overrides
  28. // ClassWizard generated virtual function overrides
  29. //{{AFX_VIRTUAL(CMainFrame)
  30. public:
  31. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  32. protected:
  33. virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
  34. //}}AFX_VIRTUAL
  35. // Implementation
  36. public:
  37. virtual ~CMainFrame();
  38. #ifdef _DEBUG
  39. virtual void AssertValid() const;
  40. virtual void Dump(CDumpContext& dc) const;
  41. #endif
  42. public:
  43. void
  44. EnumFailed(
  45. HRESULT reason,
  46. CLicServer * pLicServer
  47. );
  48. BOOL
  49. IsUserAdmin(
  50. CString& Server
  51. );
  52. void
  53. SetTreeViewSel(
  54. LPARAM lParam,
  55. NODETYPE NodeType
  56. );
  57. void
  58. DeleteServer(
  59. LicServerList * pLicServerList,
  60. POSITION TempPos,
  61. CLicServer * pLicServer
  62. );
  63. HRESULT
  64. AddLicensestoList(
  65. CKeyPack * pKeyPack,
  66. CListCtrl * pListCtrl,
  67. BOOL bRefresh
  68. );
  69. HRESULT
  70. AddKeyPackDialog(
  71. CLicServer * pServer
  72. );
  73. HRESULT
  74. GetLicServer(
  75. CString * pLicServer
  76. );
  77. void
  78. PressButton(
  79. UINT uId,
  80. BOOL bPress
  81. );
  82. HRESULT
  83. AddLicenses(
  84. CKeyPack * pKeyPack,
  85. UINT nLicenses
  86. );
  87. HRESULT
  88. RemoveLicenses(
  89. CKeyPack * pKeyPack,
  90. UINT nLicenses
  91. );
  92. HRESULT
  93. GetActiveServer(
  94. CLicServer ** ppServer
  95. )
  96. {
  97. *ppServer = m_pServer;
  98. if( m_pServer == NULL )
  99. {
  100. return E_FAIL;
  101. }
  102. return S_OK;
  103. }
  104. BOOL IsDownLoadedPacks( CLicServer *pServer );
  105. HRESULT
  106. RefreshServer(
  107. CLicServer * pLicServer
  108. );
  109. void SelectView(VIEW);
  110. void ConnectAndDisplay();
  111. CSplitterWnd m_SplitterWnd;
  112. BOOL
  113. ConnectServer(
  114. LPCTSTR pszServer=NULL
  115. );
  116. BOOL IsServerRegistered(
  117. HRESULT *phrStatus
  118. );
  119. BOOL IsLicensesDownLoaded( );
  120. void UI_initmenu( CMenu *pMenu , NODETYPE nt );
  121. DWORD WizardActionOnServer( WIZACTION wa , PBOOL pbRefresh , VIEW );
  122. void OnRefresh();
  123. void OnHelp( );
  124. void OnRefreshServer( );
  125. void OnDownLoadLicenses( );
  126. void OnRepeatLastDownLoad( );
  127. void OnReRegisterServer( );
  128. void OnUnRegisterServer( );
  129. void SetActiveServer( CLicServer *pServer )
  130. {
  131. m_pServer = pServer;
  132. }
  133. private:
  134. CLicServer *m_pServer;
  135. // BOOL m_fDownloadedLicenses;
  136. protected: // control bar embedded members
  137. CStatusBar m_wndStatusBar;
  138. CToolBar m_wndToolBar;
  139. // Generated message map functions
  140. protected:
  141. CView * m_pRightView;
  142. CView * m_pLeftView;
  143. //{{AFX_MSG(CMainFrame)
  144. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  145. afx_msg LRESULT OnSelChange(WPARAM wParam, LPARAM lParam);
  146. afx_msg LRESULT OnAddAllServers(WPARAM wParam, LPARAM lParam);
  147. afx_msg LRESULT OnAddServer(WPARAM wParam, LPARAM lParam);
  148. afx_msg LRESULT OnAddKeyPack(WPARAM wParam, LPARAM lParam);
  149. afx_msg void OnLargeIcons();
  150. afx_msg void OnSmallIcons();
  151. afx_msg void OnList();
  152. afx_msg void OnDetails();
  153. afx_msg void OnExit();
  154. afx_msg void OnAppAbout();
  155. afx_msg void OnConnectServer();
  156. afx_msg void OnUpdateAddNewKeyPack(CCmdUI * pCmdUI);
  157. afx_msg void OnRegistration();
  158. afx_msg void OnProperties( );
  159. afx_msg LRESULT OnEnumerateServer(WPARAM wParam, LPARAM lParam);
  160. afx_msg void OnUpdateDownloadlicenses( CCmdUI * pCmdUI );
  161. afx_msg void OnUpdateRepeatLastDownload( CCmdUI * pCmdUI );
  162. afx_msg void OnUpdateReregisterserver( CCmdUI * pCmdUI );
  163. afx_msg void OnUpdateUnregisterserver( CCmdUI * pCmdUI );
  164. afx_msg void OnUpdateRefresh( CCmdUI *pCmdUI );
  165. afx_msg void OnUpdateProperties( CCmdUI *pCmdUI );
  166. //}}AFX_MSG
  167. DECLARE_MESSAGE_MAP()
  168. };
  169. /////////////////////////////////////////////////////////////////////////////
  170. //{{AFX_INSERT_LOCATION}}
  171. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  172. #endif // !defined(AFX_MAINFRM_H__72451C6F_887E_11D1_8AD1_00C04FB6CBB5__INCLUDED_)