#include <ctype.h>
#include <stdio.h>
#include <assert.h>
+#include <tchar.h>
#include <windows.h>
#include <richedit.h>
fontinfo.lfPitchAndFamily = 0;
EnumFontFamiliesExW(hdc, &fontinfo, enum_font_proc,
- (LPARAM)hListWnd, 0);
+ (LPARAM)(UINT_PTR)hListWnd, 0);
ZeroMemory(&fmt, sizeof(fmt));
fmt.cbSize = sizeof(fmt);
}
if (opt_print)
- MessageBox(hMainWnd, "Printing not implemented", "WordPad", MB_OK);
+ MessageBox(hMainWnd, _T("Printing not implemented"), _T("WordPad"), MB_OK);
}
static LRESULT handle_findmsg(LPFINDREPLACEW pFr)
ZeroMemory(&cbItem, sizeof(cbItem));
cbItem.mask = CBEIF_TEXT;
cbItem.iItem = idx;
- cbItem.pszText = szBuffer;
+ cbItem.pszText = (ULONG_PTR)szBuffer;
cbItem.cchTextMax = bufferLength-1;
result = SendMessage(hComboEx, CBEM_GETITEM, 0, (LPARAM)&cbItem);
if (!result)
if (!hEditorWnd)
{
- fprintf(stderr, "Error code %u\n", GetLastError());
+ fprintf(stderr, _T("Error code %d\n"), GetLastError());
return -1;
}
assert(hEditorWnd);
mi.cbSize = sizeof(MENUITEMINFOW);
mi.fMask = MIIM_DATA;
if(GetMenuItemInfoW(hMenu, LOWORD(wParam), FALSE, &mi))
- DoOpenFile((LPWSTR)mi.dwItemData);
+ DoOpenFile((LPWSTR)(ULONG_PTR)mi.dwItemData);
}
break;