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.

74 lines
2.1 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. slestrip.hxx
  7. Header file for the sle class with stripping leading and trailing
  8. characters..
  9. FILE HISTORY:
  10. Yi-HsinS 11-Oct-1991 Created
  11. thomaspa 20-Jan-1992 added nametype to SLE_STRIP()
  12. thomaspa 13-Feb-1992 Now inherits from ICANON_SLE
  13. */
  14. #ifndef _SLESTRIP_HXX_
  15. #define _SLESTRIP_HXX_
  16. #include "sleican.hxx"
  17. #define WHITE_SPACE SLE_STRIP::QueryWhiteSpace()
  18. APIERR TrimLeading( NLS_STR *pnls, const TCHAR *pszBefore);
  19. APIERR TrimTrailing( NLS_STR *pnls, const TCHAR *pszAfter);
  20. /*************************************************************************
  21. NAME: SLE_STRIP
  22. SYNOPSIS: Class definition for SLE with function of stripping
  23. leading and trailing unwanted characters.
  24. INTERFACE: QueryText - query the text in the SLE. If pszBefore or
  25. pszAfter is not given, this class is exactly the same as SLE.
  26. PARENT: ICANON_SLE
  27. USES:
  28. NOTES: Constructor is exactly the same as SLE. The only difference
  29. is the redefinition of QueryText.
  30. HISTORY:
  31. Yi-HsinS 11-Oct-1991 Created
  32. thomaspa 13-Feb-1992 Now inherits from ICANON_SLE
  33. **************************************************************************/
  34. DLL_CLASS SLE_STRIP: public ICANON_SLE
  35. {
  36. public:
  37. static const TCHAR * QueryWhiteSpace() ;
  38. SLE_STRIP( OWNER_WINDOW * powin, CID cid,
  39. UINT usMaxLen = 0, INT nNameType = 0 );
  40. SLE_STRIP( OWNER_WINDOW * powin, CID cid,
  41. XYPOINT xy, XYDIMENSION dxy,
  42. ULONG flStyle, const TCHAR * pszClassName = CW_CLASS_EDIT,
  43. UINT usMaxLen = 0, INT nNameType = 0 );
  44. APIERR QueryText( TCHAR * pszBuffer, UINT cbBufSize,
  45. const TCHAR * pszBefore = WHITE_SPACE,
  46. const TCHAR * pszAfter = WHITE_SPACE ) const;
  47. APIERR QueryText( NLS_STR * pnls,
  48. const TCHAR * pszBefore = WHITE_SPACE,
  49. const TCHAR * pszAfter = WHITE_SPACE ) const;
  50. };
  51. #endif