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.

76 lines
2.0 KiB

  1. //--------------------------------------------------------------------------
  2. //
  3. // controls.h
  4. //
  5. //--------------------------------------------------------------------------
  6. #include "..\ieakutil\ieakutil.h"
  7. #define CSW_BORDER 0x00000000
  8. #define CSW_FRAME 0x00000001
  9. #define CSW_LABEL 0x00000002
  10. #define CSW_BOLDLABEL (CSW_LABEL | 0x00000010)
  11. #define CSW_ITALICLABEL (CSW_LABEL | 0x00000020)
  12. #define HasOnlyFlag(dwFlags, dwMask) (((DWORD)(dwFlags) ^ (DWORD)(dwMask)) == 0L)
  13. #define SCROLL_PAGE 50
  14. #define SCROLL_LINE 5
  15. class CStaticWindow
  16. {
  17. private:
  18. BOOL fCreated;
  19. int nControlX, nControlY, nControlWidth, nControlHeight;
  20. HWND hWnd;
  21. DWORD dwType;
  22. public:
  23. CStaticWindow( );
  24. ~CStaticWindow( );
  25. void Create( HWND hwndParent, int x, int y, int nWidth, int nHeight, DWORD dwFlags );
  26. void MoveWindow( int x, int y, int nWidth, int nHeight );
  27. void Destroy( );
  28. int SetText( LPTSTR szText);
  29. void MoveUp( int nValue );
  30. void MoveLeft( int nValue );
  31. HWND Hwnd();
  32. HFONT GetFont();
  33. };
  34. class CAdmControl
  35. {
  36. private:
  37. HWND hControl;
  38. HWND hUpDown;
  39. CStaticWindow label;
  40. int nControlX, nControlY, nControlWidth, nControlHeight;
  41. BOOL fCreated;
  42. int nPart;
  43. public:
  44. CAdmControl( );
  45. ~CAdmControl( );
  46. int Create( HWND hwndParent, int x, int y, int nWidth, int nHeight, int nTextWidth,
  47. LPPART part, LPPARTDATA pPartData, BOOL fRSoPMode);
  48. void Destroy( );
  49. void Save( LPPART part, LPPARTDATA pPartData );
  50. void MoveUp( int nValue );
  51. void MoveLeft( int nValue );
  52. void Reset(LPPART part, LPPARTDATA pPartData);
  53. int GetPart();
  54. void SetPart(int nPartNo);
  55. };
  56. typedef struct ControlInfo
  57. {
  58. WNDPROC lpOrgControlProc;
  59. LPPART lpPart;
  60. LPPARTDATA lpPartData;
  61. } CONTROLINFO, *LPCONTROLINFO;
  62. typedef struct ValueInfo
  63. {
  64. TCHAR* pValueName;
  65. TCHAR* pValue;
  66. } VALUEINFO, *LPVALUEINFO;