HICON hBgIcon;
SETTINGS Settings;
+/* GetUName prototype */
+typedef int (WINAPI * GETUNAME)(WORD wCharCode, LPWSTR lpbuf);
+GETUNAME GetUName;
+
/* Font-enumeration callback */
static
int
}
#endif
+VOID
+UpdateStatusBar(WCHAR wch)
+{
+ WCHAR buff[MAX_PATH];
+ WCHAR szDesc[MAX_PATH];
+
+ if (GetUName)
+ {
+ GetUName(wch, szDesc);
+ wsprintfW(buff, L"U+%04X: %s", wch, szDesc);
+ SendMessageW(hStatusWnd, SB_SETTEXT, 0, (LPARAM)buff);
+ }
+}
+
static
void
ChangeView(HWND hWnd)
INT Ret = 1;
HMODULE hRichEd20;
MSG Msg;
+ HINSTANCE hGetUName = NULL;
hInstance = hInst;
iccx.dwICC = ICC_TAB_CLASSES;
InitCommonControlsEx(&iccx);
+ /* Loading the GetUName function */
+ hGetUName = LoadLibraryW(L"getuname.dll");
+ if (hGetUName != NULL)
+ {
+ GetUName = (GETUNAME) GetProcAddress(hGetUName, "GetUName");
+ if (GetUName == NULL)
+ {
+ FreeLibrary(hGetUName);
+ hGetUName = NULL;
+ }
+ }
+
if (RegisterMapClasses(hInstance))
{
hRichEd20 = LoadLibraryW(L"RICHED20.DLL");
UnregisterMapClasses(hInstance);
}
+ if (hGetUName != NULL)
+ FreeLibrary(hGetUName);
+
return Ret;
}