Dmitry Timoshkov : regedit: Fix Win64 warnings.
Alexandre Julliard
julliard at winehq.org
Wed Apr 9 14:31:29 CDT 2008
Module: wine
Branch: master
Commit: a5816064f04a6bf138dbfd28f293522b2a6f4c61
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a5816064f04a6bf138dbfd28f293522b2a6f4c61
Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date: Wed Apr 9 21:22:42 2008 +0900
regedit: Fix Win64 warnings.
---
programs/regedit/listview.c | 10 +++++-----
programs/regedit/main.c | 2 +-
programs/regedit/main.h | 4 ++--
programs/regedit/treeview.c | 4 ++--
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/programs/regedit/listview.c b/programs/regedit/listview.c
index 4798b51..4e2010f 100644
--- a/programs/regedit/listview.c
+++ b/programs/regedit/listview.c
@@ -43,7 +43,7 @@ typedef struct tagLINE_INFO
*/
static WNDPROC g_orgListWndProc;
-static DWORD g_columnToSort = ~0UL;
+static DWORD g_columnToSort = ~0U;
static BOOL g_invertSort = FALSE;
static LPTSTR g_valueName;
static LPTSTR g_currentPath;
@@ -327,7 +327,7 @@ static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSor
if (!l->name) return -1;
if (!r->name) return +1;
- if (g_columnToSort == ~0UL)
+ if (g_columnToSort == ~0U)
g_columnToSort = 0;
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;
HWND hwndLV;
@@ -467,7 +467,7 @@ HWND CreateListView(HWND hwndParent, int id)
hwndLV = CreateWindowEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, _T("List View"),
WS_VISIBLE | WS_CHILD | WS_TABSTOP | LVS_REPORT | LVS_EDITLABELS,
0, 0, rcClient.right, rcClient.bottom,
- hwndParent, (HMENU)id, hInst, NULL);
+ hwndParent, (HMENU)ULongToHandle(id), hInst, NULL);
if (!hwndLV) return NULL;
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);
HeapFree(GetProcessHeap(), 0, (void*)item.lParam);
}
- g_columnToSort = ~0UL;
+ g_columnToSort = ~0U;
SendMessage( hwndLV, LVM_DELETEALLITEMS, 0, 0L );
/* get size information and resize the buffers if necessary */
diff --git a/programs/regedit/main.c b/programs/regedit/main.c
index 4a6b0ce..2b95287 100644
--- a/programs/regedit/main.c
+++ b/programs/regedit/main.c
@@ -118,7 +118,7 @@ static BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
DWORD dwError = GetLastError();
} */
- hFrameWnd = CreateWindowEx(0, (LPCTSTR)(int)hFrameWndClass, szTitle,
+ hFrameWnd = CreateWindowEx(0, MAKEINTRESOURCE(hFrameWndClass), szTitle,
WS_OVERLAPPEDWINDOW | WS_EX_CLIENTEDGE,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
NULL, hMenuFrame, hInstance, NULL/*lpParam*/);
diff --git a/programs/regedit/main.h b/programs/regedit/main.h
index a2a3c19..0c39101 100644
--- a/programs/regedit/main.h
+++ b/programs/regedit/main.h
@@ -106,7 +106,7 @@ extern void SetupStatusBar(HWND hWnd, BOOL bResize);
extern void UpdateStatusBar(void);
/* 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 HWND StartValueRename(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);
/* 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 OnTreeExpanding(HWND hWnd, NMTREEVIEW* pnmtv);
extern LPTSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey);
diff --git a/programs/regedit/treeview.c b/programs/regedit/treeview.c
index 7a21f0d..bfce4aa 100644
--- a/programs/regedit/treeview.c
+++ b/programs/regedit/treeview.c
@@ -650,7 +650,7 @@ BOOL OnTreeExpanding(HWND hwndTV, NMTREEVIEW* pnmtv)
* Returns the handle to the new control if successful, or NULL otherwise.
* 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;
HWND hwndTV;
@@ -660,7 +660,7 @@ HWND CreateTreeView(HWND hwndParent, LPTSTR pHostName, int id)
hwndTV = CreateWindowEx(WS_EX_CLIENTEDGE, WC_TREEVIEW, _T("Tree View"),
WS_VISIBLE | WS_CHILD | WS_TABSTOP | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT,
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. */
if (!InitTreeViewImageLists(hwndTV) || !InitTreeViewItems(hwndTV, pHostName)) {
DestroyWindow(hwndTV);
More information about the wine-cvs
mailing list