Leaked source code of windows server 2003
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.

137 lines
4.0 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1998
  6. //
  7. // File: property.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef _PROPERTY_
  11. #define _PROPERTY_
  12. #include "mmc.h"
  13. #include "connode.h"
  14. #include "resource.h"
  15. //
  16. // Property sheet
  17. //
  18. #define APIENTRY WINAPI
  19. class CProperty
  20. {
  21. private:
  22. HWND m_hWnd;
  23. HINSTANCE m_hInst;
  24. //
  25. //UI data members
  26. //
  27. //
  28. //Prop page 1
  29. //
  30. TCHAR m_szServer[MAX_PATH];
  31. TCHAR m_szDescription[MAX_PATH];
  32. TCHAR m_szUserName[CL_MAX_USERNAME_LENGTH];
  33. TCHAR m_szPassword[CL_MAX_PASSWORD_LENGTH_BYTES/sizeof(TCHAR)];
  34. TCHAR m_szDomain[CL_MAX_DOMAIN_LENGTH];
  35. BOOL m_bSavePassword;
  36. BOOL m_bConnectToConsole;
  37. BOOL m_bChangePassword;
  38. //
  39. //Prop page 2
  40. //
  41. int m_resType;
  42. int m_Width;
  43. int m_Height;
  44. //
  45. //Prop page 3
  46. //
  47. BOOL m_bStartProgram;
  48. TCHAR m_szProgramPath[MAX_PATH];
  49. TCHAR m_szProgramStartIn[MAX_PATH];
  50. BOOL m_bRedirectDrives;
  51. //
  52. // IDisplayHelp interface
  53. //
  54. LPDISPLAYHELP m_pDisplayHelp;
  55. //private methods
  56. private:
  57. // static void PopContextHelp(LPARAM);
  58. void ProcessResolution(HWND hDlg);
  59. //Needs to hold an m_szDescription and additional text 'Properties'
  60. TCHAR m_szCaption[MAX_PATH*2];
  61. public:
  62. CProperty(HWND hWndOwner, HINSTANCE hInst);
  63. ~CProperty();
  64. static CProperty* m_pthis;
  65. BOOL CreateModalPropPage();
  66. static INT_PTR APIENTRY StaticPage1Proc(HWND, UINT, WPARAM, LPARAM);
  67. static INT_PTR APIENTRY StaticPage2Proc(HWND, UINT, WPARAM, LPARAM);
  68. static INT_PTR APIENTRY StaticPage3Proc(HWND, UINT, WPARAM, LPARAM);
  69. INT_PTR APIENTRY Page1Proc(HWND, UINT, WPARAM, LPARAM);
  70. INT_PTR APIENTRY Page2Proc(HWND, UINT, WPARAM, LPARAM);
  71. INT_PTR APIENTRY Page3Proc(HWND, UINT, WPARAM, LPARAM);
  72. //
  73. // Access functions
  74. //
  75. LPTSTR GetServer() {return m_szServer;}
  76. void SetServer(LPTSTR sz) {lstrcpy(m_szServer,sz);}
  77. LPTSTR GetDescription() {return m_szDescription;}
  78. void SetDescription(LPTSTR sz) {lstrcpy(m_szDescription,sz);}
  79. BOOL GetConnectToConsole() {return m_bConnectToConsole;}
  80. VOID SetConnectToConsole(BOOL b) {m_bConnectToConsole = b;}
  81. LPTSTR GetUserName() {return m_szUserName;}
  82. void SetUserName(LPTSTR sz) {lstrcpy(m_szUserName,sz);}
  83. LPTSTR GetPassword() {return m_szPassword;}
  84. void SetPassword(LPTSTR sz) {lstrcpy(m_szPassword,sz);}
  85. BOOL GetChangePassword() {return m_bChangePassword;}
  86. LPTSTR GetDomain() {return m_szDomain;}
  87. void SetDomain(LPTSTR sz) {lstrcpy(m_szDomain,sz);}
  88. int GetResType() {return m_resType;}
  89. void SetResType(int r) {m_resType = r;}
  90. int GetWidth() {return m_Width;}
  91. void SetWidth(int r) {m_Width = r;}
  92. int GetHeight() {return m_Height;}
  93. void SetHeight(int r) {m_Height = r;}
  94. LPTSTR GetProgramPath() {return m_szProgramPath;}
  95. void SetProgramPath(LPTSTR sz) {lstrcpy(m_szProgramPath,sz);}
  96. LPTSTR GetWorkDir() {return m_szProgramStartIn;}
  97. void SetWorkDir(LPTSTR sz) {lstrcpy(m_szProgramStartIn,sz);}
  98. BOOL GetStartProgram() {return m_bStartProgram;}
  99. void SetStartProgram(BOOL b) {m_bStartProgram = b;}
  100. BOOL GetRedirectDrives() {return m_bRedirectDrives;}
  101. void SetRedirectDrives(BOOL b) {m_bRedirectDrives = b;}
  102. void SetDisplayHelp(LPDISPLAYHELP lpHelp);
  103. HRESULT DisplayHelp();
  104. VOID SetSavePassword(BOOL fSavePass) {m_bSavePassword = fSavePass;}
  105. BOOL GetSavePassword() {return m_bSavePassword;}
  106. BOOL GetPasswordSpecified();
  107. };
  108. #endif //_PROPERTY_