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.

60 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 1985 - 1999, Microsoft Corporation
  3. Module Name:
  4. tmgrevcb.cpp
  5. Abstract:
  6. This file implements the CInputContextOwnerCallBack Class.
  7. Author:
  8. Revision History:
  9. Notes:
  10. --*/
  11. #include "private.h"
  12. #include "tmgrevcb.h"
  13. #include "cime.h"
  14. #include "imtls.h"
  15. // static
  16. HRESULT
  17. CThreadMgrEventSinkCallBack::ThreadMgrEventSinkCallback(
  18. UINT uCode,
  19. ITfContext* pic,
  20. void* pv
  21. )
  22. {
  23. DebugMsg(TF_FUNC, "ThreadMgrEventSinkCallback");
  24. IMTLS *ptls;
  25. HRESULT hr = S_OK;
  26. switch (uCode) {
  27. case TIM_CODE_INITIC:
  28. case TIM_CODE_UNINITIC:
  29. {
  30. if ((ptls = IMTLS_GetOrAlloc()) == NULL)
  31. break;
  32. IMCLock imc(ptls->hIMC);
  33. if (SUCCEEDED(hr=imc.GetResult())) {
  34. if (! ptls->m_fMyPushPop) {
  35. SendMessage(imc->hWnd, WM_IME_NOTIFY,
  36. (uCode == TIM_CODE_INITIC) ? IMN_OPENCANDIDATE : IMN_CLOSECANDIDATE, 1L);
  37. }
  38. }
  39. }
  40. break;
  41. }
  42. return hr;
  43. }