wordpad: Remove superfluous pointer casts.

This commit is contained in:
Michael Stefaniuc 2009-01-17 22:56:19 +01:00 committed by Alexandre Julliard
parent c36ce23795
commit 688bdb645f
2 changed files with 10 additions and 10 deletions

View File

@ -95,7 +95,7 @@ static void AddTextButton(HWND hRebarWnd, UINT string, UINT command, UINT id)
LoadStringW(hInstance, string, text, MAX_STRING_LEN);
hButton = CreateWindowW(WC_BUTTONW, text,
WS_VISIBLE | WS_CHILD, 5, 5, 100, 15,
hRebarWnd, (HMENU)ULongToHandle(command), hInstance, NULL);
hRebarWnd, ULongToHandle(command), hInstance, NULL);
rb.cbSize = sizeof(rb);
rb.fMask = RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_STYLE | RBBIM_CHILD | RBBIM_IDEALSIZE | RBBIM_ID;
@ -226,12 +226,12 @@ static LPWSTR dialog_print_to_file(HWND hMainWnd)
ofn.Flags = OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
ofn.hwndOwner = hMainWnd;
ofn.lpstrFilter = file_filter;
ofn.lpstrFile = (LPWSTR)file;
ofn.lpstrFile = file;
ofn.nMaxFile = MAX_PATH;
ofn.lpstrDefExt = (LPWSTR)defExt;
ofn.lpstrDefExt = defExt;
if(GetSaveFileNameW(&ofn))
return (LPWSTR)file;
return file;
else
return FALSE;
}

View File

@ -301,7 +301,7 @@ static void on_sizelist_modified(HWND hwndSizeList, LPWSTR wszNewFontSize)
if(lstrcmpW(sizeBuffer, wszNewFontSize))
{
float size = 0;
if(number_from_string((LPCWSTR) wszNewFontSize, &size, FALSE)
if(number_from_string(wszNewFontSize, &size, FALSE)
&& size > 0)
{
set_size(size);
@ -322,7 +322,7 @@ static void add_size(HWND hSizeListWnd, unsigned size)
cbItem.iItem = -1;
wsprintfW(buffer, stringFormat, size);
cbItem.pszText = (LPWSTR)buffer;
cbItem.pszText = buffer;
SendMessageW(hSizeListWnd, CBEM_INSERTITEMW, 0, (LPARAM)&cbItem);
}
@ -494,7 +494,7 @@ static void on_fontlist_modified(LPWSTR wszNewFaceName)
SendMessageW(hEditorWnd, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&format);
if(lstrcmpW(format.szFaceName, wszNewFaceName))
set_font((LPCWSTR) wszNewFaceName);
set_font(wszNewFaceName);
}
static void add_font(LPCWSTR fontName, DWORD fontType, HWND hListWnd, const NEWTEXTMETRICEXW *ntmc)
@ -1412,11 +1412,11 @@ static INT_PTR CALLBACK newfile_proc(HWND hWnd, UINT message, WPARAM wParam, LPA
WCHAR buffer[MAX_STRING_LEN];
HWND hListWnd = GetDlgItem(hWnd, IDC_NEWFILE);
LoadStringW(hInstance, STRING_NEWFILE_RICHTEXT, (LPWSTR)buffer, MAX_STRING_LEN);
LoadStringW(hInstance, STRING_NEWFILE_RICHTEXT, buffer, MAX_STRING_LEN);
SendMessageW(hListWnd, LB_ADDSTRING, 0, (LPARAM)&buffer);
LoadStringW(hInstance, STRING_NEWFILE_TXT, (LPWSTR)buffer, MAX_STRING_LEN);
LoadStringW(hInstance, STRING_NEWFILE_TXT, buffer, MAX_STRING_LEN);
SendMessageW(hListWnd, LB_ADDSTRING, 0, (LPARAM)&buffer);
LoadStringW(hInstance, STRING_NEWFILE_TXT_UNICODE, (LPWSTR)buffer, MAX_STRING_LEN);
LoadStringW(hInstance, STRING_NEWFILE_TXT_UNICODE, buffer, MAX_STRING_LEN);
SendMessageW(hListWnd, LB_ADDSTRING, 0, (LPARAM)&buffer);
SendMessageW(hListWnd, LB_SETSEL, TRUE, 0);