I work on my own WinAPI project and use ANSI version of API language C/C++ but I have faced with the issue when I running the program on computer with non-Russian version windows. I see unreadable symbols instead of russian letters.
I try to use method AddFontResourceEx and on Russian version Windows it works correctly but when I run on non-Russian version Windows I have got an error "Font 1 Error" and I see unreadable symbols. How can I solve this issue?
Font "MY_ARIAL.TTF" is in the folder with exe-file
LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
static LOGFONT lf1;
switch (uMsg)
{
case WM_CREATE:
if(AddFontResourceEx("MY_ARIAL.TTF", FR_PRIVATE, NULL)!=0)
{
SendMessage(HWND_BROADCAST, WM_FONTCHANGE,0,0);
lstrcpy((LPSTR)&lf1.lfFaceName, "My_Arial");
}
else
MessageBox(hWnd,"Font 1 Error","error",MB_OK);
}
}