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.

97 lines
3.0 KiB

  1. /****************************************************************************
  2. PROPMODE.CPP : PropertyButton class managing Hanja button on the Cicero Toolbar
  3. History:
  4. 25-FEB-2000 CSLim Created
  5. ****************************************************************************/
  6. #include "precomp.h"
  7. #include "propmode.h"
  8. #include "ui.h"
  9. #include "winex.h"
  10. #include "resource.h"
  11. extern const CLSID CLDSID_LBI_KORIME_IMM32; // {0198111B-FE89-4b4c-8619-8A5E015F29D8}
  12. // {83DC4284-4BAC-4231-87F1-A4ADE98603B2}
  13. const GUID GUID_LBI_KORIME_PROP_BUTTON =
  14. {
  15. 0x83dc4284,
  16. 0x4bac,
  17. 0x4231,
  18. { 0x87, 0xf1, 0xa4, 0xad, 0xe9, 0x86, 0x3, 0xb2 }
  19. };
  20. /*---------------------------------------------------------------------------
  21. PropertyButton::PropertyButton
  22. ---------------------------------------------------------------------------*/
  23. PropertyButton::PropertyButton(CToolBar *ptb)
  24. {
  25. WCHAR szText[256];
  26. m_pTb = ptb;
  27. // Set Add/Remove text and tootip text
  28. OurLoadStringW(vpInstData->hInst, IDS_STATUS_BUTTON_PROP, szText, sizeof(szText)/sizeof(WCHAR));
  29. InitNuiInfo(CLDSID_LBI_KORIME_IMM32,
  30. GUID_LBI_KORIME_PROP_BUTTON,
  31. TF_LBI_STYLE_BTN_BUTTON,
  32. 1,
  33. szText);
  34. SetToolTip(szText);
  35. // Set button text
  36. SetText(szText);
  37. }
  38. /*---------------------------------------------------------------------------
  39. PropertyButton::GetIcon
  40. Get Button face Icon
  41. ---------------------------------------------------------------------------*/
  42. STDAPI PropertyButton::GetIcon(HICON *phIcon)
  43. {
  44. *phIcon = LoadIcon(vpInstData->hInst, MAKEINTRESOURCE(IDI_CMODE_PROP));
  45. return S_OK;
  46. }
  47. /*---------------------------------------------------------------------------
  48. PropertyButton::InitMenu
  49. No need, this is just toggle button
  50. ---------------------------------------------------------------------------*/
  51. STDAPI PropertyButton::InitMenu(ITfMenu *pMenu)
  52. {
  53. return E_NOTIMPL;
  54. }
  55. /*---------------------------------------------------------------------------
  56. PropertyButton::OnMenuSelect
  57. No need, this is just toggle button
  58. ---------------------------------------------------------------------------*/
  59. STDAPI PropertyButton::OnMenuSelect(UINT wID)
  60. {
  61. return E_NOTIMPL;
  62. }
  63. /*---------------------------------------------------------------------------
  64. PropertyButton::OnLButtonUp
  65. ---------------------------------------------------------------------------*/
  66. HRESULT PropertyButton::OnLButtonUp(const POINT pt, const RECT* prcArea)
  67. {
  68. OurPostMessage(GetActiveUIWnd(), WM_MSIME_PROPERTY, 0L, IME_CONFIG_GENERAL);
  69. return S_OK;
  70. }
  71. /*---------------------------------------------------------------------------
  72. PropertyButton::OnRButtonUp
  73. ---------------------------------------------------------------------------*/
  74. HRESULT PropertyButton::OnRButtonUp(const POINT pt, const RECT* prcArea)
  75. {
  76. return S_OK;
  77. }