regedit: Fix Win64 warnings.

This commit is contained in:
Dmitry Timoshkov 2008-04-09 21:22:42 +09:00 committed by Alexandre Julliard
parent 7656d8860e
commit a5816064f0
4 changed files with 10 additions and 10 deletions

View file

@ -43,7 +43,7 @@ typedef struct tagLINE_INFO
*/ */
static WNDPROC g_orgListWndProc; static WNDPROC g_orgListWndProc;
static DWORD g_columnToSort = ~0UL; static DWORD g_columnToSort = ~0U;
static BOOL g_invertSort = FALSE; static BOOL g_invertSort = FALSE;
static LPTSTR g_valueName; static LPTSTR g_valueName;
static LPTSTR g_currentPath; static LPTSTR g_currentPath;
@ -327,7 +327,7 @@ static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSor
if (!l->name) return -1; if (!l->name) return -1;
if (!r->name) return +1; if (!r->name) return +1;
if (g_columnToSort == ~0UL) if (g_columnToSort == ~0U)
g_columnToSort = 0; g_columnToSort = 0;
if (g_columnToSort == 1 && l->dwValType != r->dwValType) if (g_columnToSort == 1 && l->dwValType != r->dwValType)
@ -454,7 +454,7 @@ static LRESULT CALLBACK ListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR
} }
HWND CreateListView(HWND hwndParent, int id) HWND CreateListView(HWND hwndParent, UINT id)
{ {
RECT rcClient; RECT rcClient;
HWND hwndLV; HWND hwndLV;
@ -467,7 +467,7 @@ HWND CreateListView(HWND hwndParent, int id)
hwndLV = CreateWindowEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, _T("List View"), hwndLV = CreateWindowEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, _T("List View"),
WS_VISIBLE | WS_CHILD | WS_TABSTOP | LVS_REPORT | LVS_EDITLABELS, WS_VISIBLE | WS_CHILD | WS_TABSTOP | LVS_REPORT | LVS_EDITLABELS,
0, 0, rcClient.right, rcClient.bottom, 0, 0, rcClient.right, rcClient.bottom,
hwndParent, (HMENU)id, hInst, NULL); hwndParent, (HMENU)ULongToHandle(id), hInst, NULL);
if (!hwndLV) return NULL; if (!hwndLV) return NULL;
SendMessage(hwndLV, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT); SendMessage(hwndLV, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT);
@ -510,7 +510,7 @@ BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR highli
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 = ~0U;
SendMessage( hwndLV, LVM_DELETEALLITEMS, 0, 0L ); SendMessage( hwndLV, LVM_DELETEALLITEMS, 0, 0L );
/* get size information and resize the buffers if necessary */ /* get size information and resize the buffers if necessary */

View file

@ -118,7 +118,7 @@ static BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
DWORD dwError = GetLastError(); DWORD dwError = GetLastError();
} */ } */
hFrameWnd = CreateWindowEx(0, (LPCTSTR)(int)hFrameWndClass, szTitle, hFrameWnd = CreateWindowEx(0, MAKEINTRESOURCE(hFrameWndClass), szTitle,
WS_OVERLAPPEDWINDOW | WS_EX_CLIENTEDGE, WS_OVERLAPPEDWINDOW | WS_EX_CLIENTEDGE,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
NULL, hMenuFrame, hInstance, NULL/*lpParam*/); NULL, hMenuFrame, hInstance, NULL/*lpParam*/);

View file

@ -106,7 +106,7 @@ extern void SetupStatusBar(HWND hWnd, BOOL bResize);
extern void UpdateStatusBar(void); extern void UpdateStatusBar(void);
/* listview.c */ /* listview.c */
extern HWND CreateListView(HWND hwndParent, int id); extern HWND CreateListView(HWND hwndParent, UINT id);
extern BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR highlightValue); extern BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR highlightValue);
extern HWND StartValueRename(HWND hwndLV); extern HWND StartValueRename(HWND hwndLV);
extern LPCTSTR GetValueName(HWND hwndLV); extern LPCTSTR GetValueName(HWND hwndLV);
@ -114,7 +114,7 @@ extern BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Res
extern BOOL IsDefaultValue(HWND hwndLV, int i); extern BOOL IsDefaultValue(HWND hwndLV, int i);
/* treeview.c */ /* treeview.c */
extern HWND CreateTreeView(HWND hwndParent, LPTSTR pHostName, int id); extern HWND CreateTreeView(HWND hwndParent, LPTSTR pHostName, UINT id);
extern BOOL RefreshTreeView(HWND hWndTV); extern BOOL RefreshTreeView(HWND hWndTV);
extern BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEW* pnmtv); extern BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEW* pnmtv);
extern LPTSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey); extern LPTSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey);

View file

@ -650,7 +650,7 @@ BOOL OnTreeExpanding(HWND hwndTV, NMTREEVIEW* pnmtv)
* Returns the handle to the new control if successful, or NULL otherwise. * Returns the handle to the new control if successful, or NULL otherwise.
* hwndParent - handle to the control's parent window. * hwndParent - handle to the control's parent window.
*/ */
HWND CreateTreeView(HWND hwndParent, LPTSTR pHostName, int id) HWND CreateTreeView(HWND hwndParent, LPTSTR pHostName, UINT id)
{ {
RECT rcClient; RECT rcClient;
HWND hwndTV; HWND hwndTV;
@ -660,7 +660,7 @@ HWND CreateTreeView(HWND hwndParent, LPTSTR pHostName, int id)
hwndTV = CreateWindowEx(WS_EX_CLIENTEDGE, WC_TREEVIEW, _T("Tree View"), hwndTV = CreateWindowEx(WS_EX_CLIENTEDGE, WC_TREEVIEW, _T("Tree View"),
WS_VISIBLE | WS_CHILD | WS_TABSTOP | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT, WS_VISIBLE | WS_CHILD | WS_TABSTOP | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT,
0, 0, rcClient.right, rcClient.bottom, 0, 0, rcClient.right, rcClient.bottom,
hwndParent, (HMENU)id, hInst, NULL); hwndParent, (HMENU)ULongToHandle(id), hInst, NULL);
/* Initialize the image list, and add items to the control. */ /* Initialize the image list, and add items to the control. */
if (!InitTreeViewImageLists(hwndTV) || !InitTreeViewItems(hwndTV, pHostName)) { if (!InitTreeViewImageLists(hwndTV) || !InitTreeViewItems(hwndTV, pHostName)) {
DestroyWindow(hwndTV); DestroyWindow(hwndTV);