Hello, I have a Win32 Direct2D program which allows me write text on screen. I found a way to print characters based on selected Keyboard-Language but I get some extra characters now.
Thanks, that works now. In messagebox I display any character from any language. However, I have a new issue. I use Dİrect2D rendering to render text on the screen. When I try to render any character from different language like "йцукенгшщзф" that throws following error on image:
WCHAR wc1[] = L"RU J LETTER: \u0436"; This fixed the issue on direct2D. Now the last problem is I get pressed keys on win32api:
1 2 3 4 5 6 7 8 9 10
LRESULT CALLBACK SystemClass::MessageHandler(HWND hwnd, UINT umsg, WPARAM wparam, LPARAM lparam)
{
switch (umsg)
{
case WM_CHAR: {
m_Input->AnyCharPressed = true;
wchar_t myChar[] = { LOWORD((unsignedint)wparam), 0 };
//Here I pass the pressed key to wchar_t variable which will be used during direct2d drawing.
...
I REMOVED: if (isprint((unsignedint)wparam)) WHICH THROW ERROR
I INSTEAD ADDED iswprint: if (iswprint((unsignedint)wparam))
The point is, I should handle keycode in "UNICODE" form, like L"\u0436" since only that will help to draw it on Direct2D api. I do not know how to do this. Any ideas ???