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
863ffb71
Commit
863ffb71
authored
Dec 31, 2007
by
Andrew Talbot
Committed by
Alexandre Julliard
Jan 02, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Remove unneeded casts.
parent
2cf28070
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
63 deletions
+42
-63
propsheet.c
dlls/comctl32/propsheet.c
+18
-18
status.c
dlls/comctl32/status.c
+1
-2
tab.c
dlls/comctl32/tab.c
+1
-1
toolbar.c
dlls/comctl32/toolbar.c
+4
-5
tooltips.c
dlls/comctl32/tooltips.c
+9
-16
trackbar.c
dlls/comctl32/trackbar.c
+1
-2
treeview.c
dlls/comctl32/treeview.c
+8
-19
No files found.
dlls/comctl32/propsheet.c
View file @
863ffb71
...
...
@@ -522,7 +522,7 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
p
+=
2
;
break
;
default:
p
+=
lstrlenW
(
(
LPCWSTR
)
p
)
+
1
;
p
+=
lstrlenW
(
p
)
+
1
;
break
;
}
...
...
@@ -536,14 +536,14 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
p
+=
2
;
break
;
default:
p
+=
lstrlenW
(
(
LPCWSTR
)
p
)
+
1
;
p
+=
lstrlenW
(
p
)
+
1
;
break
;
}
/* Extract the caption */
psInfo
->
proppage
[
index
].
pszText
=
(
LPCWSTR
)
p
;
TRACE
(
"Tab %d %s
\n
"
,
index
,
debugstr_w
(
(
LPCWSTR
)
p
));
p
+=
lstrlenW
(
(
LPCWSTR
)
p
)
+
1
;
psInfo
->
proppage
[
index
].
pszText
=
p
;
TRACE
(
"Tab %d %s
\n
"
,
index
,
debugstr_w
(
p
));
p
+=
lstrlenW
(
p
)
+
1
;
if
(
dwFlags
&
PSP_USETITLE
)
{
...
...
@@ -632,7 +632,7 @@ static INT_PTR PROPSHEET_CreateDialog(PropSheetInfo* psInfo)
return
-
1
;
}
if
(
!
(
template
=
(
LPVOID
)
LoadResource
(
COMCTL32_hModule
,
hRes
)))
if
(
!
(
template
=
LoadResource
(
COMCTL32_hModule
,
hRes
)))
return
-
1
;
/*
...
...
@@ -1288,8 +1288,8 @@ static UINT GetTemplateSize(const DLGTEMPLATE* pTemplate)
p
+=
2
;
break
;
default:
TRACE
(
"menu %s
\n
"
,
debugstr_w
(
(
LPCWSTR
)
p
));
p
+=
lstrlenW
(
(
LPCWSTR
)
p
)
+
1
;
TRACE
(
"menu %s
\n
"
,
debugstr_w
(
p
));
p
+=
lstrlenW
(
p
)
+
1
;
break
;
}
...
...
@@ -1303,22 +1303,22 @@ static UINT GetTemplateSize(const DLGTEMPLATE* pTemplate)
p
+=
2
;
/* 0xffff plus predefined window class ordinal value */
break
;
default:
TRACE
(
"class %s
\n
"
,
debugstr_w
(
(
LPCWSTR
)
p
));
p
+=
lstrlenW
(
(
LPCWSTR
)
p
)
+
1
;
TRACE
(
"class %s
\n
"
,
debugstr_w
(
p
));
p
+=
lstrlenW
(
p
)
+
1
;
break
;
}
/* title */
TRACE
(
"title %s
\n
"
,
debugstr_w
(
(
LPCWSTR
)
p
));
p
+=
lstrlenW
(
(
LPCWSTR
)
p
)
+
1
;
TRACE
(
"title %s
\n
"
,
debugstr_w
(
p
));
p
+=
lstrlenW
(
p
)
+
1
;
/* font, if DS_SETFONT set */
if
((
DS_SETFONT
&
((
istemplateex
)
?
((
const
MyDLGTEMPLATEEX
*
)
pTemplate
)
->
style
:
pTemplate
->
style
)))
{
p
+=
(
istemplateex
)
?
3
:
1
;
TRACE
(
"font %s
\n
"
,
debugstr_w
(
(
LPCWSTR
)
p
));
p
+=
lstrlenW
(
(
LPCWSTR
)
p
)
+
1
;
/* the font name */
TRACE
(
"font %s
\n
"
,
debugstr_w
(
p
));
p
+=
lstrlenW
(
p
)
+
1
;
/* the font name */
}
/* now process the DLGITEMTEMPLATE(EX) structs (plus custom data)
...
...
@@ -1342,8 +1342,8 @@ static UINT GetTemplateSize(const DLGTEMPLATE* pTemplate)
p
+=
2
;
break
;
default:
TRACE
(
"class %s
\n
"
,
debugstr_w
(
(
LPCWSTR
)
p
));
p
+=
lstrlenW
(
(
LPCWSTR
)
p
)
+
1
;
TRACE
(
"class %s
\n
"
,
debugstr_w
(
p
));
p
+=
lstrlenW
(
p
)
+
1
;
break
;
}
...
...
@@ -1358,8 +1358,8 @@ static UINT GetTemplateSize(const DLGTEMPLATE* pTemplate)
p
+=
2
;
break
;
default:
TRACE
(
"text %s
\n
"
,
debugstr_w
(
(
LPCWSTR
)
p
));
p
+=
lstrlenW
(
(
LPCWSTR
)
p
)
+
1
;
TRACE
(
"text %s
\n
"
,
debugstr_w
(
p
));
p
+=
lstrlenW
(
p
)
+
1
;
break
;
}
p
+=
*
p
/
sizeof
(
WORD
)
+
1
;
/* Skip extra data */
...
...
dlls/comctl32/status.c
View file @
863ffb71
...
...
@@ -1019,8 +1019,7 @@ STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA *lpCreate)
nmttc
.
hdr
.
code
=
NM_TOOLTIPSCREATED
;
nmttc
.
hwndToolTips
=
infoPtr
->
hwndToolTip
;
SendMessageW
(
lpCreate
->
hwndParent
,
WM_NOTIFY
,
(
WPARAM
)
nmttc
.
hdr
.
idFrom
,
(
LPARAM
)
&
nmttc
);
SendMessageW
(
lpCreate
->
hwndParent
,
WM_NOTIFY
,
nmttc
.
hdr
.
idFrom
,
(
LPARAM
)
&
nmttc
);
}
}
...
...
dlls/comctl32/tab.c
View file @
863ffb71
...
...
@@ -178,7 +178,7 @@ TAB_SendSimpleNotify (const TAB_INFO *infoPtr, UINT code)
nmhdr
.
code
=
code
;
return
(
BOOL
)
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
(
WPARAM
)
nmhdr
.
idFrom
,
(
LPARAM
)
&
nmhdr
);
nmhdr
.
idFrom
,
(
LPARAM
)
&
nmhdr
);
}
static
void
...
...
dlls/comctl32/toolbar.c
View file @
863ffb71
...
...
@@ -341,8 +341,7 @@ TOOLBAR_SendNotify (NMHDR *nmhdr, const TOOLBAR_INFO *infoPtr, UINT code)
TRACE
(
"to window %p, code=%08x, %s
\n
"
,
infoPtr
->
hwndNotify
,
code
,
(
infoPtr
->
bUnicode
)
?
"via Unicode"
:
"via ANSI"
);
return
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
(
WPARAM
)
nmhdr
->
idFrom
,
(
LPARAM
)
nmhdr
);
return
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
nmhdr
->
idFrom
,
(
LPARAM
)
nmhdr
);
}
/***********************************************************************
...
...
@@ -3918,7 +3917,7 @@ TOOLBAR_LoadImages (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
TBADDBITMAP
tbab
;
tbab
.
hInst
=
(
HINSTANCE
)
lParam
;
tbab
.
nID
=
(
UINT_PTR
)
wParam
;
tbab
.
nID
=
wParam
;
TRACE
(
"hwnd = %p, hInst = %p, nID = %lu
\n
"
,
hwnd
,
tbab
.
hInst
,
tbab
.
nID
);
...
...
@@ -4231,7 +4230,7 @@ TOOLBAR_Restore(TOOLBAR_INFO *infoPtr, const TBSAVEPARAMSW *lpSave)
if
(
!
res
)
{
nmtbr
.
pData
=
Alloc
(
dwSize
);
nmtbr
.
cbData
=
(
UINT
)
dwSize
;
nmtbr
.
cbData
=
dwSize
;
if
(
!
nmtbr
.
pData
)
res
=
ERROR_OUTOFMEMORY
;
}
if
(
!
res
)
...
...
@@ -6374,7 +6373,7 @@ static LRESULT TOOLBAR_TTGetDispInfo (TOOLBAR_INFO *infoPtr, NMTTDISPINFOW *lpnm
/* last resort: send notification on to app */
/* FIXME: find out what is really used here */
return
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
(
WPARAM
)
lpnmtdi
->
hdr
.
idFrom
,
(
LPARAM
)
lpnmtdi
);
return
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
lpnmtdi
->
hdr
.
idFrom
,
(
LPARAM
)
lpnmtdi
);
}
...
...
dlls/comctl32/tooltips.c
View file @
863ffb71
...
...
@@ -320,8 +320,7 @@ static void TOOLTIPS_GetDispInfoA(HWND hwnd, TOOLTIPS_INFO *infoPtr, TTTOOL_INFO
ttnmdi
.
lParam
=
toolPtr
->
lParam
;
TRACE
(
"hdr.idFrom = %lx
\n
"
,
ttnmdi
.
hdr
.
idFrom
);
SendMessageW
(
toolPtr
->
hwnd
,
WM_NOTIFY
,
(
WPARAM
)
toolPtr
->
uId
,
(
LPARAM
)
&
ttnmdi
);
SendMessageW
(
toolPtr
->
hwnd
,
WM_NOTIFY
,
toolPtr
->
uId
,
(
LPARAM
)
&
ttnmdi
);
if
(
IS_INTRESOURCE
(
ttnmdi
.
lpszText
))
{
LoadStringW
(
ttnmdi
.
hinst
,
LOWORD
(
ttnmdi
.
lpszText
),
...
...
@@ -351,8 +350,7 @@ static void TOOLTIPS_GetDispInfoA(HWND hwnd, TOOLTIPS_INFO *infoPtr, TTTOOL_INFO
/* FIXME: Unsure if SETITEM should save the value or not */
if
(
infoPtr
->
szTipText
[
0
]
==
0x00
)
{
SendMessageW
(
GetParent
(
toolPtr
->
hwnd
),
WM_NOTIFY
,
(
WPARAM
)
toolPtr
->
uId
,
(
LPARAM
)
&
ttnmdi
);
SendMessageW
(
GetParent
(
toolPtr
->
hwnd
),
WM_NOTIFY
,
toolPtr
->
uId
,
(
LPARAM
)
&
ttnmdi
);
if
(
IS_INTRESOURCE
(
ttnmdi
.
lpszText
))
{
LoadStringW
(
ttnmdi
.
hinst
,
LOWORD
(
ttnmdi
.
lpszText
),
...
...
@@ -378,8 +376,7 @@ static void TOOLTIPS_GetDispInfoW(HWND hwnd, TOOLTIPS_INFO *infoPtr, TTTOOL_INFO
ttnmdi
.
lParam
=
toolPtr
->
lParam
;
TRACE
(
"hdr.idFrom = %lx
\n
"
,
ttnmdi
.
hdr
.
idFrom
);
SendMessageW
(
toolPtr
->
hwnd
,
WM_NOTIFY
,
(
WPARAM
)
toolPtr
->
uId
,
(
LPARAM
)
&
ttnmdi
);
SendMessageW
(
toolPtr
->
hwnd
,
WM_NOTIFY
,
toolPtr
->
uId
,
(
LPARAM
)
&
ttnmdi
);
if
(
IS_INTRESOURCE
(
ttnmdi
.
lpszText
))
{
LoadStringW
(
ttnmdi
.
hinst
,
LOWORD
(
ttnmdi
.
lpszText
),
...
...
@@ -409,8 +406,7 @@ static void TOOLTIPS_GetDispInfoW(HWND hwnd, TOOLTIPS_INFO *infoPtr, TTTOOL_INFO
/* FIXME: Unsure if SETITEM should save the value or not */
if
(
infoPtr
->
szTipText
[
0
]
==
0x00
)
{
SendMessageW
(
GetParent
(
toolPtr
->
hwnd
),
WM_NOTIFY
,
(
WPARAM
)
toolPtr
->
uId
,
(
LPARAM
)
&
ttnmdi
);
SendMessageW
(
GetParent
(
toolPtr
->
hwnd
),
WM_NOTIFY
,
toolPtr
->
uId
,
(
LPARAM
)
&
ttnmdi
);
if
(
IS_INTRESOURCE
(
ttnmdi
.
lpszText
))
{
LoadStringW
(
ttnmdi
.
hinst
,
LOWORD
(
ttnmdi
.
lpszText
),
...
...
@@ -563,8 +559,7 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr, BOOL track_activate)
hdr
.
hwndFrom
=
hwnd
;
hdr
.
idFrom
=
toolPtr
->
uId
;
hdr
.
code
=
TTN_SHOW
;
SendMessageW
(
toolPtr
->
hwnd
,
WM_NOTIFY
,
(
WPARAM
)
toolPtr
->
uId
,
(
LPARAM
)
&
hdr
);
SendMessageW
(
toolPtr
->
hwnd
,
WM_NOTIFY
,
toolPtr
->
uId
,
(
LPARAM
)
&
hdr
);
TRACE
(
"%s
\n
"
,
debugstr_w
(
infoPtr
->
szTipText
));
...
...
@@ -792,8 +787,7 @@ TOOLTIPS_Hide (HWND hwnd, TOOLTIPS_INFO *infoPtr)
hdr
.
hwndFrom
=
hwnd
;
hdr
.
idFrom
=
toolPtr
->
uId
;
hdr
.
code
=
TTN_POP
;
SendMessageW
(
toolPtr
->
hwnd
,
WM_NOTIFY
,
(
WPARAM
)
toolPtr
->
uId
,
(
LPARAM
)
&
hdr
);
SendMessageW
(
toolPtr
->
hwnd
,
WM_NOTIFY
,
toolPtr
->
uId
,
(
LPARAM
)
&
hdr
);
infoPtr
->
nCurrentTool
=
-
1
;
...
...
@@ -825,8 +819,7 @@ TOOLTIPS_TrackHide (HWND hwnd, const TOOLTIPS_INFO *infoPtr)
hdr
.
hwndFrom
=
hwnd
;
hdr
.
idFrom
=
toolPtr
->
uId
;
hdr
.
code
=
TTN_POP
;
SendMessageW
(
toolPtr
->
hwnd
,
WM_NOTIFY
,
(
WPARAM
)
toolPtr
->
uId
,
(
LPARAM
)
&
hdr
);
SendMessageW
(
toolPtr
->
hwnd
,
WM_NOTIFY
,
toolPtr
->
uId
,
(
LPARAM
)
&
hdr
);
SetWindowPos
(
hwnd
,
HWND_TOP
,
0
,
0
,
0
,
0
,
SWP_NOZORDER
|
SWP_HIDEWINDOW
|
SWP_NOACTIVATE
);
...
...
@@ -1922,7 +1915,7 @@ TOOLTIPS_SetTitleA (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
TOOLTIPS_INFO
*
infoPtr
=
TOOLTIPS_GetInfoPtr
(
hwnd
);
LPCSTR
pszTitle
=
(
LPCSTR
)
lParam
;
UINT_PTR
uTitleIcon
=
(
UINT_PTR
)
wParam
;
UINT_PTR
uTitleIcon
=
wParam
;
UINT
size
;
TRACE
(
"hwnd = %p, title = %s, icon = %p
\n
"
,
hwnd
,
debugstr_a
(
pszTitle
),
...
...
@@ -1955,7 +1948,7 @@ TOOLTIPS_SetTitleW (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
TOOLTIPS_INFO
*
infoPtr
=
TOOLTIPS_GetInfoPtr
(
hwnd
);
LPCWSTR
pszTitle
=
(
LPCWSTR
)
lParam
;
UINT_PTR
uTitleIcon
=
(
UINT_PTR
)
wParam
;
UINT_PTR
uTitleIcon
=
wParam
;
UINT
size
;
TRACE
(
"hwnd = %p, title = %s, icon = %p
\n
"
,
hwnd
,
debugstr_w
(
pszTitle
),
...
...
dlls/comctl32/trackbar.c
View file @
863ffb71
...
...
@@ -119,8 +119,7 @@ static LRESULT notify_hdr (const TRACKBAR_INFO *infoPtr, INT code, LPNMHDR pnmh)
pnmh
->
hwndFrom
=
infoPtr
->
hwndSelf
;
pnmh
->
idFrom
=
GetWindowLongPtrW
(
infoPtr
->
hwndSelf
,
GWLP_ID
);
pnmh
->
code
=
code
;
result
=
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
(
WPARAM
)
pnmh
->
idFrom
,
(
LPARAM
)
pnmh
);
result
=
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
pnmh
->
idFrom
,
(
LPARAM
)
pnmh
);
TRACE
(
" <= %ld
\n
"
,
result
);
...
...
dlls/comctl32/treeview.c
View file @
863ffb71
...
...
@@ -518,8 +518,7 @@ TREEVIEW_SendSimpleNotify(const TREEVIEW_INFO *infoPtr, UINT code)
nmhdr
.
idFrom
=
GetWindowLongPtrW
(
hwnd
,
GWLP_ID
);
nmhdr
.
code
=
get_notifycode
(
infoPtr
,
code
);
return
(
BOOL
)
TREEVIEW_SendRealNotify
(
infoPtr
,
(
WPARAM
)
nmhdr
.
idFrom
,
(
LPARAM
)
&
nmhdr
);
return
(
BOOL
)
TREEVIEW_SendRealNotify
(
infoPtr
,
nmhdr
.
idFrom
,
(
LPARAM
)
&
nmhdr
);
}
static
VOID
...
...
@@ -582,9 +581,7 @@ TREEVIEW_SendTreeviewNotify(const TREEVIEW_INFO *infoPtr, UINT code, UINT action
nmhdr
.
ptDrag
.
x
=
0
;
nmhdr
.
ptDrag
.
y
=
0
;
ret
=
(
BOOL
)
TREEVIEW_SendRealNotify
(
infoPtr
,
(
WPARAM
)
nmhdr
.
hdr
.
idFrom
,
(
LPARAM
)
&
nmhdr
);
ret
=
(
BOOL
)
TREEVIEW_SendRealNotify
(
infoPtr
,
nmhdr
.
hdr
.
idFrom
,
(
LPARAM
)
&
nmhdr
);
if
(
!
infoPtr
->
bNtfUnicode
)
{
Free
(
nmhdr
.
itemOld
.
pszText
);
...
...
@@ -614,9 +611,7 @@ TREEVIEW_SendTreeviewDnDNotify(const TREEVIEW_INFO *infoPtr, UINT code,
nmhdr
.
ptDrag
.
x
=
pt
.
x
;
nmhdr
.
ptDrag
.
y
=
pt
.
y
;
return
(
BOOL
)
TREEVIEW_SendRealNotify
(
infoPtr
,
(
WPARAM
)
nmhdr
.
hdr
.
idFrom
,
(
LPARAM
)
&
nmhdr
);
return
(
BOOL
)
TREEVIEW_SendRealNotify
(
infoPtr
,
nmhdr
.
hdr
.
idFrom
,
(
LPARAM
)
&
nmhdr
);
}
...
...
@@ -644,9 +639,7 @@ TREEVIEW_SendCustomDrawNotify(const TREEVIEW_INFO *infoPtr, DWORD dwDrawStage,
nmcdhdr
.
clrTextBk
=
infoPtr
->
clrBk
;
nmcdhdr
.
iLevel
=
0
;
return
(
BOOL
)
TREEVIEW_SendRealNotify
(
infoPtr
,
(
WPARAM
)
nmcd
->
hdr
.
idFrom
,
(
LPARAM
)
&
nmcdhdr
);
return
(
BOOL
)
TREEVIEW_SendRealNotify
(
infoPtr
,
nmcd
->
hdr
.
idFrom
,
(
LPARAM
)
&
nmcdhdr
);
}
...
...
@@ -691,11 +684,9 @@ TREEVIEW_SendCustomDrawItemNotify(const TREEVIEW_INFO *infoPtr, HDC hdc,
nmcd
->
dwDrawStage
,
nmcd
->
hdc
,
nmcd
->
dwItemSpec
,
nmcd
->
uItemState
,
nmcd
->
lItemlParam
);
retval
=
TREEVIEW_SendRealNotify
(
infoPtr
,
(
WPARAM
)
nmcd
->
hdr
.
idFrom
,
(
LPARAM
)
nmcdhdr
);
retval
=
TREEVIEW_SendRealNotify
(
infoPtr
,
nmcd
->
hdr
.
idFrom
,
(
LPARAM
)
nmcdhdr
);
return
(
BOOL
)
retval
;
return
retval
;
}
static
BOOL
...
...
@@ -750,8 +741,7 @@ TREEVIEW_UpdateDispInfo(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
if
(
mask
&
TVIF_TEXT
)
wineItem
->
textWidth
=
0
;
TREEVIEW_SendRealNotify
(
infoPtr
,
(
WPARAM
)
callback
.
hdr
.
idFrom
,
(
LPARAM
)
&
callback
);
TREEVIEW_SendRealNotify
(
infoPtr
,
callback
.
hdr
.
idFrom
,
(
LPARAM
)
&
callback
);
/* It may have changed due to a call to SetItem. */
mask
&=
wineItem
->
callbackMask
;
...
...
@@ -3784,8 +3774,7 @@ TREEVIEW_EndEditLabelNow(TREEVIEW_INFO *infoPtr, BOOL bCancel)
tvdi
.
item
.
cchTextMax
=
0
;
}
bCommit
=
(
BOOL
)
TREEVIEW_SendRealNotify
(
infoPtr
,
(
WPARAM
)
tvdi
.
hdr
.
idFrom
,
(
LPARAM
)
&
tvdi
);
bCommit
=
(
BOOL
)
TREEVIEW_SendRealNotify
(
infoPtr
,
tvdi
.
hdr
.
idFrom
,
(
LPARAM
)
&
tvdi
);
if
(
!
bCancel
&&
bCommit
)
/* Apply the changes */
{
...
...
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