mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 21:44:31 +00:00
[CHARMAP]
Statusbar character descriptions. Patch by Baruch Rutman. CORE-7386 #resolve #comment Thanks a lot! svn path=/trunk/; revision=71104
This commit is contained in:
parent
a6e21cf122
commit
88a13bc297
|
@ -24,6 +24,10 @@ HICON hSmIcon;
|
|||
HICON hBgIcon;
|
||||
SETTINGS Settings;
|
||||
|
||||
/* GetUName prototype */
|
||||
typedef int (WINAPI * GETUNAME)(WORD wCharCode, LPWSTR lpbuf);
|
||||
GETUNAME GetUName;
|
||||
|
||||
/* Font-enumeration callback */
|
||||
static
|
||||
int
|
||||
|
@ -257,6 +261,20 @@ UpdateSettings(HWND hDlg)
|
|||
}
|
||||
#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)
|
||||
|
@ -571,6 +589,7 @@ wWinMain(HINSTANCE hInst,
|
|||
INT Ret = 1;
|
||||
HMODULE hRichEd20;
|
||||
MSG Msg;
|
||||
HINSTANCE hGetUName = NULL;
|
||||
|
||||
hInstance = hInst;
|
||||
|
||||
|
@ -578,6 +597,18 @@ wWinMain(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");
|
||||
|
@ -603,5 +634,8 @@ wWinMain(HINSTANCE hInst,
|
|||
UnregisterMapClasses(hInstance);
|
||||
}
|
||||
|
||||
if (hGetUName != NULL)
|
||||
FreeLibrary(hGetUName);
|
||||
|
||||
return Ret;
|
||||
}
|
||||
|
|
|
@ -140,6 +140,7 @@ LrgCellWndProc(HWND hwnd,
|
|||
EndPaint(hwnd,
|
||||
&ps);
|
||||
|
||||
UpdateStatusBar(infoPtr->pActiveCell->ch);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,6 +74,7 @@ BOOL RegisterMapClasses(HINSTANCE hInstance);
|
|||
VOID UnregisterMapClasses(HINSTANCE hInstance);
|
||||
|
||||
/* charmap.c */
|
||||
VOID UpdateStatusBar(WCHAR wch);
|
||||
extern VOID ChangeMapFont(HWND hDlg);
|
||||
|
||||
/* settings.c */
|
||||
|
|
Loading…
Reference in a new issue