From abe7b485016c3bad595d0b7c1598cf9b585ce14e Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Tue, 29 Nov 2005 01:48:25 +0000 Subject: [PATCH] fixed some warnings when compiling with msvc svn path=/trunk/; revision=19740 --- reactos/subsys/system/regedit/childwnd.c | 4 ++-- reactos/subsys/system/regedit/edit.c | 4 ++-- reactos/subsys/system/regedit/hexedit.c | 2 +- reactos/subsys/system/regedit/listview.c | 4 ++-- reactos/subsys/system/regedit/main.c | 2 +- reactos/subsys/system/regedit/main.h | 4 ++-- reactos/subsys/system/regedit/treeview.c | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/reactos/subsys/system/regedit/childwnd.c b/reactos/subsys/system/regedit/childwnd.c index cb69300f626..988aa477f72 100644 --- a/reactos/subsys/system/regedit/childwnd.c +++ b/reactos/subsys/system/regedit/childwnd.c @@ -287,8 +287,8 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa _tcsncpy(pChildWnd->szPath, buffer, MAX_PATH); pChildWnd->nSplitPos = 250; pChildWnd->hWnd = hWnd; - pChildWnd->hTreeWnd = CreateTreeView(hWnd, pChildWnd->szPath, TREE_WINDOW); - pChildWnd->hListWnd = CreateListView(hWnd, LIST_WINDOW/*, pChildWnd->szPath*/); + pChildWnd->hTreeWnd = CreateTreeView(hWnd, pChildWnd->szPath, (HMENU) TREE_WINDOW); + pChildWnd->hListWnd = CreateListView(hWnd, (HMENU) LIST_WINDOW/*, pChildWnd->szPath*/); SetFocus(pChildWnd->hTreeWnd); break; } diff --git a/reactos/subsys/system/regedit/edit.c b/reactos/subsys/system/regedit/edit.c index c8d8771c70f..25c146794c5 100644 --- a/reactos/subsys/system/regedit/edit.c +++ b/reactos/subsys/system/regedit/edit.c @@ -248,7 +248,7 @@ LRESULT CALLBACK DwordEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPAR { WNDPROC oldwndproc; - oldwndproc = (WNDPROC)GetWindowLongPtr(hwnd, GWL_USERDATA); + oldwndproc = (WNDPROC)(LONG_PTR)GetWindowLongPtr(hwnd, GWL_USERDATA); switch (uMsg) { @@ -301,7 +301,7 @@ INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP /* subclass the edit control */ hwndValue = GetDlgItem(hwndDlg, IDC_VALUE_DATA); - oldproc = (WNDPROC)GetWindowLongPtr(hwndValue, GWL_WNDPROC); + oldproc = (WNDPROC)(LONG_PTR)GetWindowLongPtr(hwndValue, GWL_WNDPROC); SetWindowLongPtr(hwndValue, GWL_USERDATA, (DWORD_PTR)oldproc); SetWindowLongPtr(hwndValue, GWL_WNDPROC, (DWORD_PTR)DwordEditSubclassProc); diff --git a/reactos/subsys/system/regedit/hexedit.c b/reactos/subsys/system/regedit/hexedit.c index 4bf3ecc0d3e..ae43ec571ba 100644 --- a/reactos/subsys/system/regedit/hexedit.c +++ b/reactos/subsys/system/regedit/hexedit.c @@ -867,7 +867,7 @@ HexEditWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { PHEXEDIT_DATA hed; - hed = (PHEXEDIT_DATA)GetWindowLongPtr(hWnd, (DWORD_PTR)0); + hed = (PHEXEDIT_DATA)(LONG_PTR)GetWindowLongPtr(hWnd, (DWORD_PTR)0); switch(uMsg) { case WM_ERASEBKGND: diff --git a/reactos/subsys/system/regedit/listview.c b/reactos/subsys/system/regedit/listview.c index 3e583f880df..1b1482dc916 100644 --- a/reactos/subsys/system/regedit/listview.c +++ b/reactos/subsys/system/regedit/listview.c @@ -474,7 +474,7 @@ BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result) } -HWND CreateListView(HWND hwndParent, int id) +HWND CreateListView(HWND hwndParent, HMENU id) { RECT rcClient; HWND hwndLV; @@ -484,7 +484,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, id, hInst, NULL); if (!hwndLV) return NULL; /* Initialize the image list, and add items to the control. */ diff --git a/reactos/subsys/system/regedit/main.c b/reactos/subsys/system/regedit/main.c index 174e3c8c09b..8b58ffe0ee7 100644 --- a/reactos/subsys/system/regedit/main.c +++ b/reactos/subsys/system/regedit/main.c @@ -144,7 +144,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) DWORD dwError = GetLastError(); } */ - hFrameWnd = CreateWindowEx(WS_EX_WINDOWEDGE, (LPCTSTR)(int)hFrameWndClass, szTitle, + hFrameWnd = CreateWindowEx(WS_EX_WINDOWEDGE, (LPCTSTR)(UlongToPtr(hFrameWndClass)), szTitle, WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, hMenuFrame, hInstance, NULL/*lpParam*/); diff --git a/reactos/subsys/system/regedit/main.h b/reactos/subsys/system/regedit/main.h index 2660123c6e3..1f9ef59e477 100644 --- a/reactos/subsys/system/regedit/main.h +++ b/reactos/subsys/system/regedit/main.h @@ -99,14 +99,14 @@ extern BOOL CopyKeyName(HWND hWnd, HKEY hRootKey, LPCTSTR keyName); extern BOOL ExportRegistryFile(HWND hWnd); /* listview.c */ -extern HWND CreateListView(HWND hwndParent, int id); +extern HWND CreateListView(HWND hwndParent, HMENU id); extern BOOL RefreshListView(HWND hwndLV, HKEY hKey, LPCTSTR keyPath); extern LPCTSTR GetValueName(HWND hwndLV, int iStartAt); extern BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result); 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, HMENU id); extern BOOL RefreshTreeView(HWND hWndTV); extern BOOL RefreshTreeItem(HWND hwndTV, HTREEITEM hItem); extern BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEW* pnmtv); diff --git a/reactos/subsys/system/regedit/treeview.c b/reactos/subsys/system/regedit/treeview.c index 3e125b65d82..54eb1729d53 100644 --- a/reactos/subsys/system/regedit/treeview.c +++ b/reactos/subsys/system/regedit/treeview.c @@ -572,7 +572,7 @@ done: * 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, HMENU id) { RECT rcClient; HWND hwndTV; @@ -582,7 +582,7 @@ HWND CreateTreeView(HWND hwndParent, LPTSTR pHostName, int id) hwndTV = CreateWindowEx(WS_EX_CLIENTEDGE, WC_TREEVIEW, NULL, WS_VISIBLE | WS_CHILD | WS_TABSTOP | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT | TVS_EDITLABELS, 0, 0, rcClient.right, rcClient.bottom, - hwndParent, (HMENU)id, hInst, NULL); + hwndParent, id, hInst, NULL); /* Initialize the image list, and add items to the control. */ if (!InitTreeViewImageLists(hwndTV) || !InitTreeViewItems(hwndTV, pHostName)) { DestroyWindow(hwndTV);