I've changed the implementation to delegate the IME composition string rendering to the IME UI. Windows does the same for some IME, though not when using the Korean IME somehow. I'm not sure how the edit control decides that, but it's maybe not worth worrying too much for now, and factoring the rendering in imm32 makes the code simpler.
I have implemented a simple text wrapping support, using `DrawTextW`, which should hopefully be good enough. The display could be later improved in imm32, using uniscribe or something else, but I have no idea what would be a good choice.
The composition string is displayed on top of the edit control, and doesn't move the underlying text. This is a little bit similar to Windows, but it still looks like it manages to shift some text there, though it's not clear how and it's also not very accurate either, so hopefully also something that could be improved later.
Lastly, because imm32 is not using uniscribe, the font looks very slightly different. Again, hopefully not a big deal. I think in some cases the display is also a bit redundant with the host IME display.