0

I have a chicken or the egg problem -

I'm trying to create a custom context menu for a richtextbox control that INCLUDES the "Reconversion" menu choice provided by the default textbox context menu when IME is enabled.

So here is the issue -

Duplicating the default text menu choices (Cut,Copy...) is a no brainer, but how can I ADD a menu that will access the IME Reconversion window?

I was thinking it might be possible to hook the Windows handle for this menu but I haven't got the slighest clue.

(Note the RichTextBox control does NOT have a default context menu)

My issue is that I need the formatting capability of the RTF, so I can't just use a TextBox with the default system menu (which works fine with the IME).

ByteCarp
  • 41
  • 6
  • Maybe this will help? [Putting IME in a custom text box, derived from Control](https://stackoverflow.com/a/3295736/8967612) – 41686d6564 stands w. Palestine Aug 09 '21 at 03:22
  • Maybe you just need [ImmSetOpenStatus()](https://learn.microsoft.com/en-us/windows/win32/api/imm/nf-imm-immsetopenstatus), [ImmSetStatusWindowPos()](https://learn.microsoft.com/en-us/windows/win32/api/imm/nf-imm-immsetstatuswindowpos), [ImmGetDefaultIMEWnd()](https://learn.microsoft.com/en-us/windows/win32/api/imm/nf-imm-immgetdefaultimewnd) -- [Input Method Manager](https://learn.microsoft.com/en-us/windows/win32/intl/input-method-manager) – Jimi Aug 09 '21 at 03:52
  • OK, almost there with a bit of a hack, but at least I can get to the context menu - I declared the mouseevent User API and trapped the mouseup. Menu window launches, but I can't seem to navigate it. I tried SendKeys, no luck. Get the window handle maybe? – ByteCarp Aug 17 '21 at 03:46

0 Answers0