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.

37 lines
2.0 KiB

  1. // Copyright (C) 1997 Microsoft Corporation. All rights reserved.
  2. // Functions in hhctrl.ocx that are called by hh.exe
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif // __cplusplus
  6. HMODULE LoadHHA(HWND hwnd, HINSTANCE hinst);
  7. void AuthorMsg(UINT idStringFormatResource, PCSTR pszSubString, HWND hwndParent, void* phhctrl);
  8. #ifdef __cplusplus
  9. }
  10. #endif // __cplusplus
  11. extern BOOL g_fTriedHHA; // whether or not we tried to find HHA.dll
  12. extern HMODULE g_hmodHHA; // HHA.dll module handle
  13. __inline BOOL IsHelpAuthor(void) { return g_hmodHHA != NULL; }
  14. __inline int RECT_WIDTH(RECT rc) { return rc.right - rc.left; };
  15. __inline int RECT_HEIGHT(RECT rc) { return rc.bottom - rc.top; };
  16. __inline int RECT_WIDTH(const RECT* prc) { return prc->right - prc->left; };
  17. __inline int RECT_HEIGHT(const RECT* prc) { return prc->bottom - prc->top; };
  18. __inline BOOL IsValidWindow(HWND hwnd) { return (BOOL) (hwnd && IsWindow(hwnd)); };
  19. __inline BOOL IsSpace(char ch) { return (ch == ' ' || ch == '\t'); }
  20. __inline BOOL IsDigit(char ch) { return (ch >= '0' && ch <= '9'); }
  21. __inline BOOL IsEmptyString(PCSTR psz) { return ((psz == NULL) || (!psz[0])); }
  22. __inline BOOL IsNonEmpty(PCSTR psz) { return (IsEmptyString(psz) == FALSE); }
  23. __inline BOOL IsNonEmptyString(PCSTR psz) { return (IsEmptyString(psz) == FALSE); }
  24. __inline BOOL isSameString(PCSTR psz1, PCSTR psz2) { return (psz1 && psz2 ? IsSamePrefix(psz1, psz2, -1) : FALSE); }
  25. __inline BOOL isSameString(PCWSTR pwsz1, PCWSTR pwsz2) { return (pwsz1 && pwsz2 ? IsSamePrefix(pwsz1, pwsz2, -1) : FALSE); }
  26. __inline UCHAR ToLower(char ch) { return (UCHAR) CharLower((LPTSTR) (DWORD_PTR) (UCHAR) ch); };
  27. __inline UCHAR ToUpper(char ch) { return (UCHAR) CharUpper((LPTSTR) (DWORD_PTR) (UCHAR) ch); };
  28. __inline BOOL IsEmptyStringW(LPCWSTR psz) { return ((psz == NULL) || (!psz[0])); } //REVIEW: Is this kosher?
  29. __inline BOOL IsNonEmptyW(LPCWSTR psz) { return (IsEmptyStringW(psz) == FALSE); }
  30. __inline BOOL IsNonEmptyStringW(LPCWSTR psz) { return (IsEmptyStringW(psz) == FALSE); }