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.

57 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 1985 - 1999, Microsoft Corporation
  3. Module Name:
  4. uiwnd.h
  5. Abstract:
  6. This file defines the UI Window Class.
  7. Author:
  8. Revision History:
  9. Notes:
  10. --*/
  11. #ifndef _UIWND_H_
  12. #define _UIWND_H_
  13. class CUIWindow
  14. {
  15. public:
  16. CUIWindow() {
  17. _hUIWnd = NULL;
  18. }
  19. BOOL CreateUIWindow(HKL hKL);
  20. BOOL DestroyUIWindow() {
  21. BOOL fRet = DestroyWindow(_hUIWnd);
  22. _hUIWnd = NULL;
  23. return fRet;
  24. }
  25. LONG SetUIWindowContext(HIMC hIMC) {
  26. return (LONG)SetWindowLongPtr(_hUIWnd, IMMGWLP_IMC, (LONG_PTR)hIMC);
  27. }
  28. LRESULT SendUIMessage(UINT Msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode = TRUE) {
  29. LRESULT lRet;
  30. if (fUnicode && IsOnNT()) // Because Win9x platform doesn't have SendMessageW
  31. lRet = SendMessageW(_hUIWnd, Msg, wParam, lParam);
  32. else
  33. lRet = SendMessageA(_hUIWnd, Msg, wParam, lParam);
  34. return lRet;
  35. }
  36. private:
  37. HWND _hUIWnd; // Handle of UI window.
  38. };
  39. #endif // _UIWND_H_