diff --git a/programs/wordpad/print.c b/programs/wordpad/print.c index 2a4413208c6..aa9ac71225c 100644 --- a/programs/wordpad/print.c +++ b/programs/wordpad/print.c @@ -85,7 +85,7 @@ void registry_read_pagemargins(HKEY hKey) } } -static void AddTextButton(HWND hRebarWnd, int string, int command, int id) +static void AddTextButton(HWND hRebarWnd, UINT string, UINT command, UINT id) { REBARBANDINFOW rb; HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtr(hRebarWnd, GWLP_HINSTANCE); @@ -95,7 +95,7 @@ static void AddTextButton(HWND hRebarWnd, int string, int command, int id) LoadStringW(hInstance, string, text, MAX_STRING_LEN); hButton = CreateWindowW(WC_BUTTONW, text, WS_VISIBLE | WS_CHILD, 5, 5, 100, 15, - hRebarWnd, (HMENU)command, hInstance, NULL); + hRebarWnd, (HMENU)ULongToHandle(command), hInstance, NULL); rb.cbSize = sizeof(rb); rb.fMask = RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_STYLE | RBBIM_CHILD | RBBIM_IDEALSIZE | RBBIM_ID; @@ -702,7 +702,7 @@ LRESULT print_preview(HWND hMainWnd) if(preview.hdc2) { - if((int)preview.hdc2 != -1) + if(preview.hdc2 != (HDC)-1) DeleteDC(preview.hdc2); preview.hdc2 = CreateCompatibleDC(hdc); } diff --git a/programs/wordpad/registry.c b/programs/wordpad/registry.c index aef152a235a..b8e52833f17 100644 --- a/programs/wordpad/registry.c +++ b/programs/wordpad/registry.c @@ -223,7 +223,7 @@ void registry_read_filelist(HWND hMainWnd) != ERROR_SUCCESS) break; - mi.dwItemData = (DWORD)pFile[i]; + mi.dwItemData = (ULONG_PTR)pFile[i]; wsprintfW(itemText, numFormat, i+1); lstrcpyW(buffer, pFile[i]);