Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d8bc6879
Commit
d8bc6879
authored
Mar 03, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Mar 03, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Fix some gcc 4.1 warnings caused by casts in macros.
parent
abfc9b8c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
+11
-12
childwnd.c
programs/regedit/childwnd.c
+1
-1
framewnd.c
programs/regedit/framewnd.c
+3
-3
listview.c
programs/regedit/listview.c
+7
-8
No files found.
programs/regedit/childwnd.c
View file @
d8bc6879
...
@@ -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
;
}
}
...
...
programs/regedit/framewnd.c
View file @
d8bc6879
...
@@ -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
)
{
...
...
programs/regedit/listview.c
View file @
d8bc6879
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment