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.

98 lines
2.3 KiB

  1. //Copyright (c) 1998 - 1999 Microsoft Corporation
  2. #ifndef _TODLG_H
  3. #define _TODLG_H
  4. enum TOKEN { TOKEN_DAY , TOKEN_HOUR , TOKEN_MINUTE };
  5. const ULONG kMilliMinute = 60000;
  6. const ULONG kMaxTimeoutMinute = 71580;
  7. #define E_PARSE_VALUEOVERFLOW 0x80000000
  8. #define E_PARSE_INVALID 0xffffffff
  9. #define E_SUCCESS 0
  10. #define E_PARSE_MISSING_DIGITS 0X7fffffff
  11. //---------------------------------------------------------------------
  12. // retains object state for the timeout dlg combx
  13. //---------------------------------------------------------------------
  14. typedef struct _cbxstate
  15. {
  16. int icbxSel;
  17. BOOL bEdit;
  18. } CBXSTATE;
  19. //---------------------------------------------------------------------
  20. // keeps a list of the time unit abbreviations and full names
  21. // ie: h hr hrs hour hours
  22. //---------------------------------------------------------------------
  23. typedef struct _toktable
  24. {
  25. LPTSTR pszAbbrv;
  26. DWORD dwresourceid;
  27. } TOKTABLE, *PTOKTABLE;
  28. //---------------------------------------------------------------------
  29. // Dialog for Timeout settings page
  30. //---------------------------------------------------------------------
  31. class CTimeOutDlg
  32. {
  33. CBXSTATE m_cbxst[ 3 ];
  34. public:
  35. CTimeOutDlg( );
  36. // BOOL OnInitDialog( HWND , WPARAM , LPARAM );
  37. // BOOL GetPropertySheetPage( PROPSHEETPAGE& );
  38. // BOOL OnDestroy( );
  39. // BOOL PersistSettings( HWND );
  40. // BOOL IsValidSettings( HWND );
  41. BOOL InitControl( HWND );
  42. BOOL ReleaseAbbreviates( );
  43. BOOL OnCommand( WORD , WORD , HWND , PBOOL );
  44. // static BOOL CALLBACK DlgProc( HWND , UINT , WPARAM , LPARAM );
  45. BOOL ConvertToMinutes( HWND , PULONG );
  46. BOOL InsertSortedAndSetCurSel( HWND , DWORD );
  47. BOOL RestorePreviousValue( HWND );
  48. BOOL SaveChangedSelection( HWND );
  49. BOOL OnCBNSELCHANGE( HWND );
  50. BOOL ConvertToDuration ( ULONG , LPTSTR );
  51. LRESULT ParseDurationEntry( LPTSTR , PULONG );
  52. virtual int GetCBXSTATEindex( HWND ) = 0;
  53. BOOL OnCBEditChange( HWND );
  54. BOOL DoesContainDigits( LPTSTR );
  55. BOOL OnCBDropDown( HWND );
  56. BOOL IsToken( LPTSTR , TOKEN );
  57. BOOL LoadAbbreviates( );
  58. BOOL xxxLoadAbbreviate( PTOKTABLE );
  59. BOOL xxxUnLoadAbbreviate( PTOKTABLE );
  60. };
  61. #endif // _TODLG_H