Commit a04ed945 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

comdlg32: Remove superfluous pointer casts.

parent ea885c13
......@@ -292,7 +292,7 @@ static BOOL GetFileName95(FileOpenDlgInfos *fodInfos)
(LPARAM) fodInfos);
else
lRes = DialogBoxIndirectParamA(COMDLG32_hInstance,
(LPCDLGTEMPLATEA) template,
template,
fodInfos->ofnInfos->hwndOwner,
FileOpenDlgProc95,
(LPARAM) fodInfos);
......@@ -998,7 +998,7 @@ INT_PTR CALLBACK FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l
/* Adds the FileOpenDlgInfos in the property list of the dialog
so it will be easily accessible through a GetPropA(...) */
SetPropA(hwnd, FileOpenDlgInfosStr, (HANDLE) fodInfos);
SetPropA(hwnd, FileOpenDlgInfosStr, fodInfos);
FILEDLG95_InitControls(hwnd);
......@@ -1971,7 +1971,7 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
DWORD len;
/* replace the current filter */
MemFree((LPVOID)fodInfos->ShellInfos.lpstrCurrentFilter);
MemFree(fodInfos->ShellInfos.lpstrCurrentFilter);
len = lstrlenW(lpszTemp)+1;
fodInfos->ShellInfos.lpstrCurrentFilter = MemAlloc(len * sizeof(WCHAR));
lstrcpyW( fodInfos->ShellInfos.lpstrCurrentFilter, lpszTemp);
......@@ -2484,7 +2484,7 @@ static BOOL FILEDLG95_FILETYPE_OnCommand(HWND hwnd, WORD wNotifyCode)
(fodInfos->customfilter == NULL ? 1 : 0);
/* Set the current filter with the current selection */
MemFree((LPVOID)fodInfos->ShellInfos.lpstrCurrentFilter);
MemFree(fodInfos->ShellInfos.lpstrCurrentFilter);
lpstrFilter = (LPWSTR) CBGetItemDataPtr(fodInfos->DlgInfos.hwndFileTypeCB,
iItem);
......@@ -2592,7 +2592,7 @@ static void FILEDLG95_LOOKIN_Init(HWND hwndCombo)
liInfos->iMaxIndentation = 0;
SetPropA(hwndCombo, LookInInfosStr, (HANDLE) liInfos);
SetPropA(hwndCombo, LookInInfosStr, liInfos);
/* set item height for both text field and listbox */
CBSetItemHeight(hwndCombo,-1,GetSystemMetrics(SM_CYSMICON));
......@@ -2901,7 +2901,7 @@ static int FILEDLG95_LOOKIN_InsertItemAfterParent(HWND hwnd,LPITEMIDLIST pidl)
}
/* Free pidlParent memory */
COMDLG32_SHFree((LPVOID)pidlParent);
COMDLG32_SHFree(pidlParent);
return FILEDLG95_LOOKIN_AddItem(hwnd,pidl,iParentPos + 1);
}
......@@ -3114,7 +3114,7 @@ void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd)
lstrcpyW( lpstrAllFile, lpstrTemp );
}
}
COMDLG32_SHFree( (LPVOID) pidl );
COMDLG32_SHFree( pidl );
}
}
SetWindowTextW( fodInfos->DlgInfos.hwndFileName, lpstrAllFile );
......
......@@ -822,7 +822,7 @@ LONG FD31_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam)
PFD31_DATA lfs = (PFD31_DATA) lParam;
if (!lfs) return FALSE;
SetPropA(hWnd, FD31_OFN_PROP, (HANDLE)lfs);
SetPropA(hWnd, FD31_OFN_PROP, lfs);
lfs->hwnd = hWnd;
ofn = lfs->ofnW;
......
......@@ -156,12 +156,12 @@ static HRESULT COMDLG32_StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPC
switch (src->uType)
{
case STRRET_WSTR:
lstrcpynW((LPWSTR)dest, src->u.pOleStr, len);
lstrcpynW(dest, src->u.pOleStr, len);
COMDLG32_SHFree(src->u.pOleStr);
break;
case STRRET_CSTR:
if (len && !MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, (LPWSTR)dest, len ))
if (len && !MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, dest, len ))
((LPWSTR)dest)[len-1] = 0;
break;
......@@ -169,7 +169,7 @@ static HRESULT COMDLG32_StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPC
if (pidl)
{
if (len && !MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset,
-1, (LPWSTR)dest, len ))
-1, dest, len ))
((LPWSTR)dest)[len-1] = 0;
}
break;
......@@ -196,7 +196,7 @@ IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner)
IShellBrowserImpl *sb;
FileOpenDlgInfos *fodInfos = GetPropA(hwndOwner,FileOpenDlgInfosStr);
sb=(IShellBrowserImpl*)COMDLG32_SHAlloc(sizeof(IShellBrowserImpl));
sb = COMDLG32_SHAlloc(sizeof(IShellBrowserImpl));
/* Initialisation of the member variables */
sb->ref=1;
......@@ -231,19 +231,19 @@ static HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface,
{ *ppvObj = This;
}
else if(IsEqualIID(riid, &IID_IOleWindow)) /*IOleWindow*/
{ *ppvObj = (IOleWindow*)This;
{ *ppvObj = This;
}
else if(IsEqualIID(riid, &IID_IShellBrowser)) /*IShellBrowser*/
{ *ppvObj = (IShellBrowser*)This;
{ *ppvObj = This;
}
else if(IsEqualIID(riid, &IID_ICommDlgBrowser)) /*ICommDlgBrowser*/
{ *ppvObj = (ICommDlgBrowser*) &(This->lpVtblCommDlgBrowser);
{ *ppvObj = &(This->lpVtblCommDlgBrowser);
}
else if(IsEqualIID(riid, &IID_IServiceProvider)) /* IServiceProvider */
{ *ppvObj = (ICommDlgBrowser*) &(This->lpVtblServiceProvider);
{ *ppvObj = &(This->lpVtblServiceProvider);
}
if(*ppvObj)
......@@ -442,7 +442,7 @@ static HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface,
fodInfos->Shell.FOIShellFolder = psfTmp;
/* Release old pidlAbsCurrent and update its value */
COMDLG32_SHFree((LPVOID)fodInfos->ShellInfos.pidlAbsCurrent);
COMDLG32_SHFree(fodInfos->ShellInfos.pidlAbsCurrent);
fodInfos->ShellInfos.pidlAbsCurrent = pidlTmp;
COMDLG32_UpdateCurrentDir(fodInfos);
......@@ -795,7 +795,7 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDl
}
/* Free memory used by pidl */
COMDLG32_SHFree((LPVOID)pidl);
COMDLG32_SHFree(pidl);
return hRes;
}
......
......@@ -408,7 +408,7 @@ static HWND COMDLG32_FR_DoFindReplace(
}
else
{
loadrc = (HGLOBAL)pdata->fr.hInstance;
loadrc = pdata->fr.hInstance;
}
if(!loadrc)
......
......@@ -182,7 +182,7 @@ BOOL WINAPI ChooseFontW(LPCHOOSEFONTW lpChFont)
if ( (lpChFont->Flags&CF_ENABLETEMPLATEHANDLE)!=0 )
{
template=(LPCVOID)lpChFont->hInstance;
template=lpChFont->hInstance;
} else
{
if ( (lpChFont->Flags&CF_ENABLETEMPLATE)!=0 )
......@@ -236,7 +236,7 @@ BOOL WINAPI ChooseFontA(LPCHOOSEFONTA lpChFont)
if ( (lpChFont->Flags&CF_ENABLETEMPLATEHANDLE)!=0 )
{
template=(LPCVOID)lpChFont->hInstance;
template=lpChFont->hInstance;
} else
{
if ( (lpChFont->Flags&CF_ENABLETEMPLATE)!=0 )
......@@ -601,7 +601,7 @@ LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
HCURSOR hcursor=SetCursor(LoadCursorW(0,(LPWSTR)IDC_WAIT));
static const WCHAR strColorName[] = {'[','c','o','l','o','r',' ','n','a','m','e',']',0};
SetPropW(hDlg, strWineFontData, (HANDLE)lpcf);
SetPropW(hDlg, strWineFontData, lpcf);
lpxx=lpcf->lpLogFont;
TRACE("WM_INITDIALOG lParam=%08lX\n", lParam);
......
......@@ -736,7 +736,7 @@ static BOOL PRINTDLG_SetUpPaperComboBoxW(HWND hDlg,
NrOfEntries = DeviceCapabilitiesW(PrinterName, PortName,
fwCapability_Names, Names, dm);
NrOfEntries = DeviceCapabilitiesW(PrinterName, PortName,
fwCapability_Words, (LPWSTR)Words, dm);
fwCapability_Words, Words, dm);
/* reset any current content in the combobox */
SendDlgItemMessageW(hDlg, nIDComboBox, CB_RESETCONTENT, 0, 0);
......
......@@ -74,7 +74,7 @@ static void test_DialogCancel(void)
ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_ENABLEHOOK;
ofn.lpstrDefExt = "txt";
ofn.lpfnHook = (LPOFNHOOKPROC) OFNHookProc;
ofn.lpfnHook = OFNHookProc;
ofn.lpstrInitialDir = szInitialDir;
PrintDlgA(NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment