#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);
sprintf( buf,"selection = %d..%d, line count=%ld",
pSC->chrg.cpMin, pSC->chrg.cpMax,
SendMessage(hwndEditor, EM_GETLINECOUNT, 0, 0));
- SetWindowText(GetDlgItem(hWnd, IDC_STATUSBAR), buf);
+ SetWindowTextA(GetDlgItem(hWnd, IDC_STATUSBAR), buf);
SendMessage(hWnd, WM_USER, 0, 0);
return 1;
}
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;
return 0;
}
-
-int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdParagraph, int nCmdShow)
+#if defined(__GNUC__) && !defined(__REACTOS__)
+int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdParagraph, int nCmdShow)
+#else
+int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPTSTR szCmdParagraph, int nCmdShow)
+#endif
{
INITCOMMONCONTROLSEX classes = {8, ICC_BAR_CLASSES|ICC_COOL_CLASSES|ICC_USEREX_CLASSES};
HACCEL hAccel;