Commit d8bc6879 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

regedit: Fix some gcc 4.1 warnings caused by casts in macros.

parent abfc9b8c
...@@ -320,7 +320,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa ...@@ -320,7 +320,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
item.mask = TVIF_HANDLE | TVIF_TEXT; item.mask = TVIF_HANDLE | TVIF_TEXT;
item.hItem = TreeView_GetSelection(pChildWnd->hTreeWnd); item.hItem = TreeView_GetSelection(pChildWnd->hTreeWnd);
item.pszText = dispInfo->item.pszText; item.pszText = dispInfo->item.pszText;
TreeView_SetItem(pChildWnd->hTreeWnd, &item); SendMessage( pChildWnd->hTreeWnd, TVM_SETITEMW, 0, (LPARAM)&item );
} }
return res; return res;
} }
......
...@@ -640,8 +640,8 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) ...@@ -640,8 +640,8 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
DWORD ksize = KEY_MAX_LEN, vsize = sizeof(valuebuf), type = 0; DWORD ksize = KEY_MAX_LEN, vsize = sizeof(valuebuf), type = 0;
if (RegEnumValue(hKey, LOWORD(wParam) - ID_FAVORITE_FIRST, namebuf, &ksize, NULL, if (RegEnumValue(hKey, LOWORD(wParam) - ID_FAVORITE_FIRST, namebuf, &ksize, NULL,
&type, valuebuf, &vsize) == ERROR_SUCCESS) { &type, valuebuf, &vsize) == ERROR_SUCCESS) {
TreeView_SelectItem(g_pChildWnd->hTreeWnd, SendMessage( g_pChildWnd->hTreeWnd, TVM_SELECTITEM, TVGN_CARET,
FindPathInTree(g_pChildWnd->hTreeWnd, (TCHAR *)valuebuf)); (LPARAM) FindPathInTree(g_pChildWnd->hTreeWnd, (TCHAR *)valuebuf) );
} }
RegCloseKey(hKey); RegCloseKey(hKey);
} }
...@@ -693,7 +693,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) ...@@ -693,7 +693,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
hItem = FindNext(g_pChildWnd->hTreeWnd, hItem, searchString, searchMask, &row); hItem = FindNext(g_pChildWnd->hTreeWnd, hItem, searchString, searchMask, &row);
SetCursor(hcursorOld); SetCursor(hcursorOld);
if (hItem) { if (hItem) {
TreeView_SelectItem(g_pChildWnd->hTreeWnd, hItem); SendMessage( g_pChildWnd->hTreeWnd, TVM_SELECTITEM, TVGN_CARET, (LPARAM) hItem );
InvalidateRect(g_pChildWnd->hTreeWnd, NULL, TRUE); InvalidateRect(g_pChildWnd->hTreeWnd, NULL, TRUE);
UpdateWindow(g_pChildWnd->hTreeWnd); UpdateWindow(g_pChildWnd->hTreeWnd);
if (row != -1) { if (row != -1) {
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
*/ */
#include <windows.h> #include <windows.h>
#include <windowsx.h>
#include <commctrl.h> #include <commctrl.h>
#include <stdlib.h> #include <stdlib.h>
#include <tchar.h> #include <tchar.h>
...@@ -218,7 +217,7 @@ static BOOL InitListViewImageList(HWND hWndListView) ...@@ -218,7 +217,7 @@ static BOOL InitListViewImageList(HWND hWndListView)
IMAGE_ICON, cx, cy, LR_DEFAULTCOLOR); IMAGE_ICON, cx, cy, LR_DEFAULTCOLOR);
Image_Binary = ImageList_AddIcon(himl, hicon); Image_Binary = ImageList_AddIcon(himl, hicon);
ListView_SetImageList(hWndListView, himl, LVSIL_SMALL); SendMessage( hWndListView, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM) himl );
/* fail if some of the icons failed to load */ /* fail if some of the icons failed to load */
if (ImageList_GetImageCount(himl) < 2) if (ImageList_GetImageCount(himl) < 2)
...@@ -373,7 +372,7 @@ static LRESULT CALLBACK ListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR ...@@ -373,7 +372,7 @@ static LRESULT CALLBACK ListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR
g_invertSort = FALSE; g_invertSort = FALSE;
} }
ListView_SortItems(hWnd, CompareFunc, hWnd); SendMessage(hWnd, LVM_SORTITEMS, (WPARAM)hWnd, (LPARAM)CompareFunc);
break; break;
case LVN_ENDLABELEDIT: { case LVN_ENDLABELEDIT: {
LPNMLVDISPINFO dispInfo = (LPNMLVDISPINFO)lParam; LPNMLVDISPINFO dispInfo = (LPNMLVDISPINFO)lParam;
...@@ -453,12 +452,12 @@ HWND CreateListView(HWND hwndParent, int id) ...@@ -453,12 +452,12 @@ HWND CreateListView(HWND hwndParent, int id)
0, 0, rcClient.right, rcClient.bottom, 0, 0, rcClient.right, rcClient.bottom,
hwndParent, (HMENU)id, hInst, NULL); hwndParent, (HMENU)id, hInst, NULL);
if (!hwndLV) return NULL; if (!hwndLV) return NULL;
ListView_SetExtendedListViewStyle(hwndLV, LVS_EX_FULLROWSELECT); SendMessage(hwndLV, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT);
/* Initialize the image list */ /* Initialize the image list */
if (!InitListViewImageList(hwndLV)) goto fail; if (!InitListViewImageList(hwndLV)) goto fail;
if (!CreateListColumns(hwndLV)) goto fail; if (!CreateListColumns(hwndLV)) goto fail;
g_orgListWndProc = SubclassWindow(hwndLV, ListWndProc); g_orgListWndProc = (WNDPROC) SetWindowLongPtr(hwndLV, GWLP_WNDPROC, (LPARAM)ListWndProc);
return hwndLV; return hwndLV;
fail: fail:
DestroyWindow(hwndLV); DestroyWindow(hwndLV);
...@@ -490,12 +489,12 @@ BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR highli ...@@ -490,12 +489,12 @@ BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR highli
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
item.mask = LVIF_PARAM; item.mask = LVIF_PARAM;
item.iItem = i; item.iItem = i;
ListView_GetItem(hwndLV, &item); SendMessage( hwndLV, LVM_GETITEM, 0, (LPARAM)&item );
free(((LINE_INFO*)item.lParam)->name); free(((LINE_INFO*)item.lParam)->name);
HeapFree(GetProcessHeap(), 0, (void*)item.lParam); HeapFree(GetProcessHeap(), 0, (void*)item.lParam);
} }
g_columnToSort = ~0UL; g_columnToSort = ~0UL;
ListView_DeleteAllItems(hwndLV); SendMessage( hwndLV, LVM_DELETEALLITEMS, 0, 0L );
/* get size information and resize the buffers if necessary */ /* get size information and resize the buffers if necessary */
errCode = RegQueryInfoKey(hKey, NULL, NULL, NULL, NULL, &max_sub_key_len, NULL, errCode = RegQueryInfoKey(hKey, NULL, NULL, NULL, NULL, &max_sub_key_len, NULL,
...@@ -524,7 +523,7 @@ BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR highli ...@@ -524,7 +523,7 @@ BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR highli
bSelected = TRUE; bSelected = TRUE;
AddEntryToList(hwndLV, valName[0] ? valName : NULL, valType, valBuf, valSize, bSelected); AddEntryToList(hwndLV, valName[0] ? valName : NULL, valType, valBuf, valSize, bSelected);
} }
ListView_SortItems(hwndLV, CompareFunc, hwndLV); SendMessage(hwndLV, LVM_SORTITEMS, (WPARAM)hwndLV, (LPARAM)CompareFunc);
g_currentRootKey = hKeyRoot; g_currentRootKey = hKeyRoot;
if (keyPath != g_currentPath) { if (keyPath != g_currentPath) {
......
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