mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 05:37:44 +00:00
convert to unicode in an attempt to address bug 2805
svn path=/trunk/; revision=30289
This commit is contained in:
parent
d63772135f
commit
6d45e894ef
|
@ -24,30 +24,34 @@ AboutDialogProc(HWND hDlg,
|
|||
case WM_INITDIALOG:
|
||||
{
|
||||
HWND hLicenseEditWnd;
|
||||
TCHAR strLicense[700];
|
||||
WCHAR strLicense[700];
|
||||
|
||||
hIcon = LoadImage(hInstance,
|
||||
MAKEINTRESOURCE(IDI_ICON),
|
||||
hIcon = LoadImageW(hInstance,
|
||||
MAKEINTRESOURCEW(IDI_ICON),
|
||||
IMAGE_ICON,
|
||||
16,
|
||||
16,
|
||||
0);
|
||||
|
||||
if (hIcon)
|
||||
{
|
||||
SendMessage(hDlg,
|
||||
WM_SETICON,
|
||||
ICON_SMALL,
|
||||
(LPARAM)hIcon);
|
||||
}
|
||||
|
||||
hLicenseEditWnd = GetDlgItem(hDlg,
|
||||
IDC_LICENSE_EDIT);
|
||||
|
||||
LoadString(hInstance,
|
||||
if (LoadStringW(hInstance,
|
||||
IDS_LICENSE,
|
||||
strLicense,
|
||||
sizeof(strLicense) / sizeof(TCHAR));
|
||||
|
||||
SetWindowText(hLicenseEditWnd,
|
||||
sizeof(strLicense) / sizeof(WCHAR)))
|
||||
{
|
||||
SetWindowTextW(hLicenseEditWnd,
|
||||
strLicense);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -72,8 +76,8 @@ AboutDialogProc(HWND hDlg,
|
|||
VOID
|
||||
ShowAboutDlg(HWND hWndParent)
|
||||
{
|
||||
DialogBox(hInstance,
|
||||
MAKEINTRESOURCE(IDD_ABOUTBOX),
|
||||
DialogBoxW(hInstance,
|
||||
MAKEINTRESOURCEW(IDD_ABOUTBOX),
|
||||
hWndParent,
|
||||
AboutDialogProc);
|
||||
}
|
||||
|
|
|
@ -15,16 +15,16 @@ HINSTANCE hInstance;
|
|||
|
||||
/* Font-enumeration callback */
|
||||
static int CALLBACK
|
||||
EnumFontNames(ENUMLOGFONTEX *lpelfe,
|
||||
NEWTEXTMETRICEX *lpntme,
|
||||
EnumFontNames(ENUMLOGFONTEXW *lpelfe,
|
||||
NEWTEXTMETRICEXW *lpntme,
|
||||
DWORD FontType,
|
||||
LPARAM lParam)
|
||||
{
|
||||
HWND hwndCombo = (HWND)lParam;
|
||||
TCHAR *pszName = lpelfe->elfLogFont.lfFaceName;
|
||||
LPWSTR pszName = lpelfe->elfLogFont.lfFaceName;
|
||||
|
||||
/* make sure font doesn't already exist in our list */
|
||||
if(SendMessage(hwndCombo,
|
||||
if(SendMessageW(hwndCombo,
|
||||
CB_FINDSTRING,
|
||||
0,
|
||||
(LPARAM)pszName) == CB_ERR)
|
||||
|
@ -34,7 +34,7 @@ EnumFontNames(ENUMLOGFONTEX *lpelfe,
|
|||
BOOL fTrueType;
|
||||
|
||||
/* add the font */
|
||||
idx = (INT)SendMessage(hwndCombo,
|
||||
idx = (INT)SendMessageW(hwndCombo,
|
||||
CB_ADDSTRING,
|
||||
0,
|
||||
(LPARAM)pszName);
|
||||
|
@ -44,7 +44,7 @@ EnumFontNames(ENUMLOGFONTEX *lpelfe,
|
|||
fTrueType = (lpelfe->elfLogFont.lfOutPrecision == OUT_STROKE_PRECIS) ? TRUE : FALSE;
|
||||
|
||||
/* store this information in the list-item's userdata area */
|
||||
SendMessage(hwndCombo,
|
||||
SendMessageW(hwndCombo,
|
||||
CB_SETITEMDATA,
|
||||
idx,
|
||||
MAKEWPARAM(fFixed, fTrueType));
|
||||
|
@ -59,32 +59,32 @@ static VOID
|
|||
FillFontStyleComboList(HWND hwndCombo)
|
||||
{
|
||||
HDC hdc;
|
||||
LOGFONT lf;
|
||||
LOGFONTW lf;
|
||||
|
||||
/* FIXME: for fun, draw each font in its own style */
|
||||
HFONT hFont = GetStockObject(DEFAULT_GUI_FONT);
|
||||
SendMessage(hwndCombo,
|
||||
SendMessageW(hwndCombo,
|
||||
WM_SETFONT,
|
||||
(WPARAM)hFont,
|
||||
0);
|
||||
|
||||
lf.lfCharSet = DEFAULT_CHARSET;
|
||||
lf.lfFaceName[0] = _T('\0'); // all fonts
|
||||
lf.lfFaceName[0] = L'\0'; // all fonts
|
||||
lf.lfPitchAndFamily = 0;
|
||||
|
||||
hdc = GetDC(hwndCombo);
|
||||
|
||||
/* store the list of fonts in the combo */
|
||||
EnumFontFamiliesEx(hdc,
|
||||
EnumFontFamiliesExW(hdc,
|
||||
&lf,
|
||||
(FONTENUMPROC)EnumFontNames,
|
||||
(FONTENUMPROCW)EnumFontNames,
|
||||
(LPARAM)hwndCombo,
|
||||
0);
|
||||
|
||||
ReleaseDC(hwndCombo,
|
||||
hdc);
|
||||
|
||||
SendMessage(hwndCombo,
|
||||
SendMessageW(hwndCombo,
|
||||
CB_SETCURSEL,
|
||||
0,
|
||||
0);
|
||||
|
@ -96,12 +96,12 @@ ChangeMapFont(HWND hDlg)
|
|||
{
|
||||
HWND hCombo;
|
||||
HWND hMap;
|
||||
LPTSTR lpFontName;
|
||||
LPWSTR lpFontName;
|
||||
INT Len;
|
||||
|
||||
hCombo = GetDlgItem(hDlg, IDC_FONTCOMBO);
|
||||
|
||||
Len = GetWindowTextLength(hCombo);
|
||||
Len = GetWindowTextLengthW(hCombo);
|
||||
|
||||
if (Len != 0)
|
||||
{
|
||||
|
@ -111,14 +111,14 @@ ChangeMapFont(HWND hDlg)
|
|||
|
||||
if (lpFontName)
|
||||
{
|
||||
SendMessage(hCombo,
|
||||
SendMessageW(hCombo,
|
||||
WM_GETTEXT,
|
||||
Len + 1,
|
||||
(LPARAM)lpFontName);
|
||||
|
||||
hMap = GetDlgItem(hDlg, IDC_FONTMAP);
|
||||
|
||||
SendMessage(hMap,
|
||||
SendMessageW(hMap,
|
||||
FM_SETFONT,
|
||||
0,
|
||||
(LPARAM)lpFontName);
|
||||
|
@ -129,9 +129,9 @@ ChangeMapFont(HWND hDlg)
|
|||
|
||||
static VOID
|
||||
AddCharToSelection(HWND hText,
|
||||
TCHAR ch)
|
||||
WCHAR ch)
|
||||
{
|
||||
LPTSTR lpText;
|
||||
LPWSTR lpText;
|
||||
INT Len = GetWindowTextLength(hText);
|
||||
|
||||
if (Len != 0)
|
||||
|
@ -142,9 +142,9 @@ AddCharToSelection(HWND hText,
|
|||
|
||||
if (lpText)
|
||||
{
|
||||
LPTSTR lpStr = lpText;
|
||||
LPWSTR lpStr = lpText;
|
||||
|
||||
SendMessage(hText,
|
||||
SendMessageW(hText,
|
||||
WM_GETTEXT,
|
||||
Len + 1,
|
||||
(LPARAM)lpStr);
|
||||
|
@ -152,9 +152,9 @@ AddCharToSelection(HWND hText,
|
|||
lpStr += Len;
|
||||
*lpStr = ch;
|
||||
lpStr++;
|
||||
*lpStr = _T('\0');
|
||||
*lpStr = L'\0';
|
||||
|
||||
SendMessage(hText,
|
||||
SendMessageW(hText,
|
||||
WM_SETTEXT,
|
||||
0,
|
||||
(LPARAM)lpText);
|
||||
|
@ -166,12 +166,12 @@ AddCharToSelection(HWND hText,
|
|||
}
|
||||
else
|
||||
{
|
||||
TCHAR szText[2];
|
||||
WCHAR szText[2];
|
||||
|
||||
szText[0] = ch;
|
||||
szText[1] = _T('\0');
|
||||
szText[1] = L'\0';
|
||||
|
||||
SendMessage(hText,
|
||||
SendMessageW(hText,
|
||||
WM_SETTEXT,
|
||||
0,
|
||||
(LPARAM)szText);
|
||||
|
@ -185,35 +185,42 @@ DlgProc(HWND hDlg,
|
|||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
static HICON hSmIcon;
|
||||
static HICON hBgIcon;
|
||||
|
||||
switch(Message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
HICON hSmIcon;
|
||||
HICON hBgIcon;
|
||||
HMENU hSysMenu;
|
||||
|
||||
hSmIcon = LoadImage(hInstance,
|
||||
MAKEINTRESOURCE(IDI_ICON),
|
||||
hSmIcon = LoadImageW(hInstance,
|
||||
MAKEINTRESOURCEW(IDI_ICON),
|
||||
IMAGE_ICON,
|
||||
16,
|
||||
16,
|
||||
0);
|
||||
hBgIcon = LoadImage(hInstance,
|
||||
MAKEINTRESOURCE(IDI_ICON),
|
||||
IMAGE_ICON,
|
||||
32,
|
||||
32,
|
||||
0);
|
||||
|
||||
SendMessage(hDlg,
|
||||
if (hSmIcon)
|
||||
{
|
||||
SendMessageW(hDlg,
|
||||
WM_SETICON,
|
||||
ICON_SMALL,
|
||||
(LPARAM)hSmIcon);
|
||||
SendMessage(hDlg,
|
||||
}
|
||||
|
||||
hBgIcon = LoadImageW(hInstance,
|
||||
MAKEINTRESOURCEW(IDI_ICON),
|
||||
IMAGE_ICON,
|
||||
32,
|
||||
32,
|
||||
0);
|
||||
if (hBgIcon)
|
||||
{
|
||||
SendMessageW(hDlg,
|
||||
WM_SETICON,
|
||||
ICON_BIG,
|
||||
(LPARAM)hBgIcon);
|
||||
}
|
||||
|
||||
FillFontStyleComboList(GetDlgItem(hDlg,
|
||||
IDC_FONTCOMBO));
|
||||
|
@ -224,18 +231,18 @@ DlgProc(HWND hDlg,
|
|||
FALSE);
|
||||
if (hSysMenu != NULL)
|
||||
{
|
||||
LPCTSTR lpAboutText = NULL;
|
||||
LPCWSTR lpAboutText = NULL;
|
||||
|
||||
if (LoadString(hInstance,
|
||||
if (LoadStringW(hInstance,
|
||||
IDS_ABOUT,
|
||||
(LPTSTR)&lpAboutText,
|
||||
(LPWSTR)&lpAboutText,
|
||||
0))
|
||||
{
|
||||
AppendMenu(hSysMenu,
|
||||
AppendMenuW(hSysMenu,
|
||||
MF_SEPARATOR,
|
||||
0,
|
||||
NULL);
|
||||
AppendMenu(hSysMenu,
|
||||
AppendMenuW(hSysMenu,
|
||||
MF_STRING,
|
||||
ID_ABOUT,
|
||||
lpAboutText);
|
||||
|
@ -245,12 +252,6 @@ DlgProc(HWND hDlg,
|
|||
}
|
||||
break;
|
||||
|
||||
case WM_CLOSE:
|
||||
{
|
||||
EndDialog(hDlg, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
{
|
||||
switch(LOWORD(wParam))
|
||||
|
@ -269,7 +270,7 @@ DlgProc(HWND hDlg,
|
|||
TCHAR ch;
|
||||
HWND hMap = GetDlgItem(hDlg, IDC_FONTMAP);
|
||||
|
||||
ch = (TCHAR) SendMessage(hMap, FM_GETCHAR, 0, 0);
|
||||
ch = (TCHAR) SendMessageW(hMap, FM_GETCHAR, 0, 0);
|
||||
|
||||
if (ch)
|
||||
{
|
||||
|
@ -281,6 +282,10 @@ DlgProc(HWND hDlg,
|
|||
}
|
||||
|
||||
case IDOK:
|
||||
if (hSmIcon)
|
||||
DestroyIcon(hSmIcon);
|
||||
if (hBgIcon)
|
||||
DestroyIcon(hBgIcon);
|
||||
EndDialog(hDlg, 0);
|
||||
break;
|
||||
}
|
||||
|
@ -321,6 +326,14 @@ DlgProc(HWND hDlg,
|
|||
}
|
||||
break;
|
||||
|
||||
case WM_CLOSE:
|
||||
if (hSmIcon)
|
||||
DestroyIcon(hSmIcon);
|
||||
if (hBgIcon)
|
||||
DestroyIcon(hBgIcon);
|
||||
EndDialog(hDlg, 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -346,8 +359,8 @@ _tWinMain(HINSTANCE hInst,
|
|||
|
||||
if (RegisterMapClasses(hInstance))
|
||||
{
|
||||
Ret = DialogBox(hInstance,
|
||||
MAKEINTRESOURCE(IDD_CHARMAP),
|
||||
Ret = DialogBoxW(hInstance,
|
||||
MAKEINTRESOURCEW(IDD_CHARMAP),
|
||||
NULL,
|
||||
(DLGPROC)DlgProc) >= 0;
|
||||
|
||||
|
|
|
@ -13,17 +13,17 @@
|
|||
static HFONT
|
||||
SetLrgFont(PMAP infoPtr)
|
||||
{
|
||||
LOGFONT lf;
|
||||
LOGFONTW lf;
|
||||
HFONT hFont = NULL;
|
||||
HDC hdc;
|
||||
HWND hCombo;
|
||||
LPTSTR lpFontName;
|
||||
LPWSTR lpFontName;
|
||||
INT Len;
|
||||
|
||||
hCombo = GetDlgItem(infoPtr->hParent,
|
||||
IDC_FONTCOMBO);
|
||||
|
||||
Len = GetWindowTextLength(hCombo);
|
||||
Len = GetWindowTextLengthW(hCombo);
|
||||
|
||||
if (Len != 0)
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ SetLrgFont(PMAP infoPtr)
|
|||
|
||||
if (lpFontName)
|
||||
{
|
||||
SendMessage(hCombo,
|
||||
SendMessageW(hCombo,
|
||||
WM_GETTEXT,
|
||||
31,
|
||||
(LPARAM)lpFontName);
|
||||
|
@ -48,10 +48,10 @@ SetLrgFont(PMAP infoPtr)
|
|||
hdc);
|
||||
|
||||
lf.lfCharSet = DEFAULT_CHARSET;
|
||||
lstrcpy(lf.lfFaceName,
|
||||
wcscpy(lf.lfFaceName,
|
||||
lpFontName);
|
||||
|
||||
hFont = CreateFontIndirect(&lf);
|
||||
hFont = CreateFontIndirectW(&lf);
|
||||
|
||||
HeapFree(GetProcessHeap(),
|
||||
0,
|
||||
|
@ -75,7 +75,7 @@ LrgCellWndProc(HWND hwnd,
|
|||
static RECT rc;
|
||||
static HFONT hFont = NULL;
|
||||
|
||||
infoPtr = (PMAP)GetWindowLongPtr(hwnd,
|
||||
infoPtr = (PMAP)GetWindowLongPtrW(hwnd,
|
||||
GWLP_USERDATA);
|
||||
|
||||
if (infoPtr == NULL && uMsg != WM_CREATE)
|
||||
|
@ -87,9 +87,9 @@ LrgCellWndProc(HWND hwnd,
|
|||
{
|
||||
case WM_CREATE:
|
||||
{
|
||||
infoPtr = (PMAP)(((LPCREATESTRUCT)lParam)->lpCreateParams);
|
||||
infoPtr = (PMAP)(((LPCREATESTRUCTW)lParam)->lpCreateParams);
|
||||
|
||||
SetWindowLongPtr(hwnd,
|
||||
SetWindowLongPtrW(hwnd,
|
||||
GWLP_USERDATA,
|
||||
(LONG_PTR)infoPtr);
|
||||
|
||||
|
@ -128,7 +128,7 @@ LrgCellWndProc(HWND hwnd,
|
|||
|
||||
hOldFont = SelectObject(hdc, hFont);
|
||||
|
||||
DrawText(hdc,
|
||||
DrawTextW(hdc,
|
||||
&infoPtr->pActiveCell->ch,
|
||||
1,
|
||||
&rc,
|
||||
|
@ -152,7 +152,7 @@ LrgCellWndProc(HWND hwnd,
|
|||
default:
|
||||
{
|
||||
HandleDefaultMessage:
|
||||
Ret = DefWindowProc(hwnd,
|
||||
Ret = DefWindowProcW(hwnd,
|
||||
uMsg,
|
||||
wParam,
|
||||
lParam);
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
#include <precomp.h>
|
||||
|
||||
static const TCHAR szMapWndClass[] = TEXT("FontMapWnd");
|
||||
static const TCHAR szLrgCellWndClass[] = TEXT("LrgCellWnd");
|
||||
static const WCHAR szMapWndClass[] = L"FontMapWnd";
|
||||
static const WCHAR szLrgCellWndClass[] = L"LrgCellWnd";
|
||||
|
||||
static VOID
|
||||
TagFontToCell(PCELL pCell,
|
||||
TCHAR ch)
|
||||
WCHAR ch)
|
||||
{
|
||||
pCell->ch = ch;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ FillGrid(PMAP infoPtr,
|
|||
HDC hdc)
|
||||
{
|
||||
HFONT hOldFont;
|
||||
TCHAR ch;
|
||||
WCHAR ch;
|
||||
INT x, y;
|
||||
|
||||
hOldFont = SelectObject(hdc,
|
||||
|
@ -91,11 +91,11 @@ FillGrid(PMAP infoPtr,
|
|||
for (y = 0; y < YCELLS; y++)
|
||||
for (x = 0; x < XCELLS; x++)
|
||||
{
|
||||
ch = (TCHAR)((256 * infoPtr->iPage) + (XCELLS * y) + x);
|
||||
ch = (WCHAR)((256 * infoPtr->iPage) + (XCELLS * y) + x);
|
||||
|
||||
TagFontToCell(&infoPtr->Cells[y][x], ch);
|
||||
|
||||
DrawText(hdc,
|
||||
DrawTextW(hdc,
|
||||
&ch,
|
||||
1,
|
||||
&infoPtr->Cells[y][x].CellInt,
|
||||
|
@ -124,7 +124,7 @@ CreateLargeCell(PMAP infoPtr)
|
|||
XLARGE - XCELLS,
|
||||
YLARGE - YCELLS);
|
||||
|
||||
infoPtr->hLrgWnd = CreateWindowEx(0,
|
||||
infoPtr->hLrgWnd = CreateWindowExW(0,
|
||||
szLrgCellWndClass,
|
||||
NULL,
|
||||
WS_CHILDWINDOW | WS_VISIBLE,
|
||||
|
@ -175,7 +175,7 @@ MoveLargeCell(PMAP infoPtr)
|
|||
|
||||
static VOID
|
||||
SetFont(PMAP infoPtr,
|
||||
LPTSTR lpFontName)
|
||||
LPWSTR lpFontName)
|
||||
{
|
||||
HDC hdc;
|
||||
|
||||
|
@ -183,7 +183,7 @@ SetFont(PMAP infoPtr,
|
|||
DeleteObject(infoPtr->hFont);
|
||||
|
||||
ZeroMemory(&infoPtr->CurrentFont,
|
||||
sizeof(LOGFONT));
|
||||
sizeof(LOGFONTW));
|
||||
|
||||
hdc = GetDC(infoPtr->hMapWnd);
|
||||
infoPtr->CurrentFont.lfHeight = GetDeviceCaps(hdc,
|
||||
|
@ -191,10 +191,10 @@ SetFont(PMAP infoPtr,
|
|||
ReleaseDC(infoPtr->hMapWnd, hdc);
|
||||
|
||||
infoPtr->CurrentFont.lfCharSet = DEFAULT_CHARSET;
|
||||
lstrcpy(infoPtr->CurrentFont.lfFaceName,
|
||||
wcscpy(infoPtr->CurrentFont.lfFaceName,
|
||||
lpFontName);
|
||||
|
||||
infoPtr->hFont = CreateFontIndirect(&infoPtr->CurrentFont);
|
||||
infoPtr->hFont = CreateFontIndirectW(&infoPtr->CurrentFont);
|
||||
|
||||
InvalidateRect(infoPtr->hMapWnd,
|
||||
NULL,
|
||||
|
@ -205,7 +205,7 @@ SetFont(PMAP infoPtr,
|
|||
static LRESULT
|
||||
NotifyParentOfSelection(PMAP infoPtr,
|
||||
UINT code,
|
||||
TCHAR ch)
|
||||
WCHAR ch)
|
||||
{
|
||||
LRESULT Ret = 0;
|
||||
|
||||
|
@ -311,7 +311,7 @@ OnCreate(PMAP infoPtr,
|
|||
if (infoPtr)
|
||||
{
|
||||
SetLastError(0);
|
||||
SetWindowLongPtr(hwnd,
|
||||
SetWindowLongPtrW(hwnd,
|
||||
0,
|
||||
(DWORD_PTR)infoPtr);
|
||||
if (GetLastError() == 0)
|
||||
|
@ -375,8 +375,7 @@ OnVScroll(PMAP infoPtr,
|
|||
}
|
||||
|
||||
infoPtr->iPage = max(0,
|
||||
min(infoPtr->iPage,
|
||||
255));
|
||||
min(infoPtr->iPage, 255));
|
||||
|
||||
SetScrollPos(infoPtr->hMapWnd,
|
||||
SB_VERT,
|
||||
|
@ -440,7 +439,7 @@ MapWndProc(HWND hwnd,
|
|||
PMAP infoPtr;
|
||||
LRESULT Ret = 0;
|
||||
|
||||
infoPtr = (PMAP)GetWindowLongPtr(hwnd,
|
||||
infoPtr = (PMAP)GetWindowLongPtrW(hwnd,
|
||||
0);
|
||||
|
||||
switch (uMsg)
|
||||
|
@ -487,7 +486,7 @@ MapWndProc(HWND hwnd,
|
|||
|
||||
case FM_SETFONT:
|
||||
{
|
||||
LPTSTR lpFontName = (LPTSTR)lParam;
|
||||
LPWSTR lpFontName = (LPWSTR)lParam;
|
||||
|
||||
SetFont(infoPtr,
|
||||
lpFontName);
|
||||
|
@ -518,7 +517,7 @@ MapWndProc(HWND hwnd,
|
|||
HeapFree(GetProcessHeap(),
|
||||
0,
|
||||
infoPtr);
|
||||
SetWindowLongPtr(hwnd,
|
||||
SetWindowLongPtrW(hwnd,
|
||||
0,
|
||||
(DWORD_PTR)NULL);
|
||||
break;
|
||||
|
@ -526,7 +525,7 @@ MapWndProc(HWND hwnd,
|
|||
|
||||
default:
|
||||
{
|
||||
Ret = DefWindowProc(hwnd,
|
||||
Ret = DefWindowProcW(hwnd,
|
||||
uMsg,
|
||||
wParam,
|
||||
lParam);
|
||||
|
@ -541,24 +540,24 @@ MapWndProc(HWND hwnd,
|
|||
BOOL
|
||||
RegisterMapClasses(HINSTANCE hInstance)
|
||||
{
|
||||
WNDCLASS wc = {0};
|
||||
WNDCLASSW wc = {0};
|
||||
|
||||
wc.style = CS_DBLCLKS;
|
||||
wc.lpfnWndProc = MapWndProc;
|
||||
wc.cbWndExtra = sizeof(PMAP);
|
||||
wc.hInstance = hInstance;
|
||||
wc.hCursor = LoadCursor(NULL,
|
||||
(LPTSTR)IDC_ARROW);
|
||||
wc.hCursor = LoadCursorW(NULL,
|
||||
(LPWSTR)IDC_ARROW);
|
||||
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
|
||||
wc.lpszClassName = szMapWndClass;
|
||||
|
||||
if (RegisterClass(&wc))
|
||||
if (RegisterClassW(&wc))
|
||||
{
|
||||
wc.lpfnWndProc = LrgCellWndProc;
|
||||
wc.cbWndExtra = 0;
|
||||
wc.lpszClassName = szLrgCellWndClass;
|
||||
|
||||
return RegisterClass(&wc) != 0;
|
||||
return RegisterClassW(&wc) != 0;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
@ -567,9 +566,9 @@ RegisterMapClasses(HINSTANCE hInstance)
|
|||
VOID
|
||||
UnregisterMapClasses(HINSTANCE hInstance)
|
||||
{
|
||||
UnregisterClass(szMapWndClass,
|
||||
UnregisterClassW(szMapWndClass,
|
||||
hInstance);
|
||||
|
||||
UnregisterClass(szLrgCellWndClass,
|
||||
UnregisterClassW(szLrgCellWndClass,
|
||||
hInstance);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ typedef struct _CELL
|
|||
RECT CellInt;
|
||||
BOOL bActive;
|
||||
BOOL bLarge;
|
||||
TCHAR ch;
|
||||
WCHAR ch;
|
||||
} CELL, *PCELL;
|
||||
|
||||
typedef struct _MAP
|
||||
|
@ -36,13 +36,13 @@ typedef struct _MAP
|
|||
CELL Cells[YCELLS][XCELLS];
|
||||
PCELL pActiveCell;
|
||||
HFONT hFont;
|
||||
LOGFONT CurrentFont;
|
||||
LOGFONTW CurrentFont;
|
||||
INT iPage;
|
||||
} MAP, *PMAP;
|
||||
|
||||
typedef struct {
|
||||
NMHDR hdr;
|
||||
TCHAR ch;
|
||||
WCHAR ch;
|
||||
} MAPNOTIFY, *LPMAPNOTIFY;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue