Sync to trunk head (35333)
[reactos.git] / reactos / base / applications / wordpad / wordpad.c
index d98758a..0fb22b4 100644 (file)
@@ -27,6 +27,7 @@
 #include <ctype.h>
 #include <stdio.h>
 #include <assert.h>
+#include <tchar.h>
 
 #include <windows.h>
 #include <richedit.h>
@@ -583,7 +584,7 @@ static void populate_font_list(HWND hListWnd)
     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);
@@ -1153,7 +1154,7 @@ static void HandleCommandLine(LPWSTR cmdline)
     }
 
     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)
@@ -1317,7 +1318,7 @@ static BOOL get_comboexlist_selection(HWND hComboEx, LPWSTR wszBuffer, UINT buff
     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)
@@ -1833,7 +1834,7 @@ static LRESULT OnCreate( HWND hWnd, WPARAM wParam, LPARAM lParam)
 
     if (!hEditorWnd)
     {
-        fprintf(stderr, "Error code %u\n", GetLastError());
+        fprintf(stderr, _T("Error code %d\n"), GetLastError());
         return -1;
     }
     assert(hEditorWnd);
@@ -2025,7 +2026,7 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
             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;