mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 05:52:56 +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
3 changed files with 36 additions and 0 deletions
|
@ -24,6 +24,10 @@ HICON hSmIcon;
|
||||||
HICON hBgIcon;
|
HICON hBgIcon;
|
||||||
SETTINGS Settings;
|
SETTINGS Settings;
|
||||||
|
|
||||||
|
/* GetUName prototype */
|
||||||
|
typedef int (WINAPI * GETUNAME)(WORD wCharCode, LPWSTR lpbuf);
|
||||||
|
GETUNAME GetUName;
|
||||||
|
|
||||||
/* Font-enumeration callback */
|
/* Font-enumeration callback */
|
||||||
static
|
static
|
||||||
int
|
int
|
||||||
|
@ -257,6 +261,20 @@ UpdateSettings(HWND hDlg)
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
static
|
||||||
void
|
void
|
||||||
ChangeView(HWND hWnd)
|
ChangeView(HWND hWnd)
|
||||||
|
@ -571,6 +589,7 @@ wWinMain(HINSTANCE hInst,
|
||||||
INT Ret = 1;
|
INT Ret = 1;
|
||||||
HMODULE hRichEd20;
|
HMODULE hRichEd20;
|
||||||
MSG Msg;
|
MSG Msg;
|
||||||
|
HINSTANCE hGetUName = NULL;
|
||||||
|
|
||||||
hInstance = hInst;
|
hInstance = hInst;
|
||||||
|
|
||||||
|
@ -578,6 +597,18 @@ wWinMain(HINSTANCE hInst,
|
||||||
iccx.dwICC = ICC_TAB_CLASSES;
|
iccx.dwICC = ICC_TAB_CLASSES;
|
||||||
InitCommonControlsEx(&iccx);
|
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))
|
if (RegisterMapClasses(hInstance))
|
||||||
{
|
{
|
||||||
hRichEd20 = LoadLibraryW(L"RICHED20.DLL");
|
hRichEd20 = LoadLibraryW(L"RICHED20.DLL");
|
||||||
|
@ -603,5 +634,8 @@ wWinMain(HINSTANCE hInst,
|
||||||
UnregisterMapClasses(hInstance);
|
UnregisterMapClasses(hInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hGetUName != NULL)
|
||||||
|
FreeLibrary(hGetUName);
|
||||||
|
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,6 +140,7 @@ LrgCellWndProc(HWND hwnd,
|
||||||
EndPaint(hwnd,
|
EndPaint(hwnd,
|
||||||
&ps);
|
&ps);
|
||||||
|
|
||||||
|
UpdateStatusBar(infoPtr->pActiveCell->ch);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,7 @@ BOOL RegisterMapClasses(HINSTANCE hInstance);
|
||||||
VOID UnregisterMapClasses(HINSTANCE hInstance);
|
VOID UnregisterMapClasses(HINSTANCE hInstance);
|
||||||
|
|
||||||
/* charmap.c */
|
/* charmap.c */
|
||||||
|
VOID UpdateStatusBar(WCHAR wch);
|
||||||
extern VOID ChangeMapFont(HWND hDlg);
|
extern VOID ChangeMapFont(HWND hDlg);
|
||||||
|
|
||||||
/* settings.c */
|
/* settings.c */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue