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
defcfc85
Commit
defcfc85
authored
Sep 16, 2004
by
Robert Shearman
Committed by
Alexandre Julliard
Sep 16, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Unicode window messages.
parent
900c0e58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
80 deletions
+80
-80
toolbar.c
dlls/comctl32/toolbar.c
+80
-80
No files found.
dlls/comctl32/toolbar.c
View file @
defcfc85
...
...
@@ -1570,14 +1570,14 @@ TOOLBAR_CalcToolbar (HWND hwnd)
/* Set the toolTip only for non-hidden, non-separator button */
if
(
infoPtr
->
hwndToolTip
&&
!
(
btnPtr
->
fsStyle
&
BTNS_SEP
))
{
TTTOOLINFO
A
ti
;
TTTOOLINFO
W
ti
;
ZeroMemory
(
&
ti
,
sizeof
(
TTTOOLINFOA
));
ti
.
cbSize
=
sizeof
(
TTTOOLINFOA
);
ZeroMemory
(
&
ti
,
sizeof
(
ti
));
ti
.
cbSize
=
sizeof
(
ti
);
ti
.
hwnd
=
hwnd
;
ti
.
uId
=
btnPtr
->
idCommand
;
ti
.
rect
=
btnPtr
->
rect
;
SendMessage
A
(
infoPtr
->
hwndToolTip
,
TTM_NEWTOOLRECTA
,
SendMessage
W
(
infoPtr
->
hwndToolTip
,
TTM_NEWTOOLRECTW
,
0
,
(
LPARAM
)
&
ti
);
}
...
...
@@ -1760,7 +1760,7 @@ TOOLBAR_RelayEvent (HWND hwndTip, HWND hwndMsg, UINT uMsg,
msg
.
pt
.
x
=
LOWORD
(
GetMessagePos
());
msg
.
pt
.
y
=
HIWORD
(
GetMessagePos
());
SendMessage
A
(
hwndTip
,
TTM_RELAYEVENT
,
0
,
(
LPARAM
)
&
msg
);
SendMessage
W
(
hwndTip
,
TTM_RELAYEVENT
,
0
,
(
LPARAM
)
&
msg
);
}
/* keeps available button list box sorted by button id */
...
...
@@ -1773,27 +1773,27 @@ static void TOOLBAR_Cust_InsertAvailButton(HWND hwnd, PCUSTOMBUTTON btnInfoNew)
ERR
(
"button %s, idCommand %d
\n
"
,
debugstr_w
(
btnInfoNew
->
text
),
btnInfoNew
->
btn
.
idCommand
);
count
=
SendMessage
A
(
hwndAvail
,
LB_GETCOUNT
,
0
,
0
);
count
=
SendMessage
W
(
hwndAvail
,
LB_GETCOUNT
,
0
,
0
);
/* position 0 is always separator */
for
(
i
=
1
;
i
<
count
;
i
++
)
{
btnInfo
=
(
PCUSTOMBUTTON
)
SendMessage
A
(
hwndAvail
,
LB_GETITEMDATA
,
i
,
0
);
btnInfo
=
(
PCUSTOMBUTTON
)
SendMessage
W
(
hwndAvail
,
LB_GETITEMDATA
,
i
,
0
);
if
(
btnInfoNew
->
btn
.
idCommand
<
btnInfo
->
btn
.
idCommand
)
{
i
=
SendMessage
A
(
hwndAvail
,
LB_INSERTSTRING
,
i
,
0
);
SendMessage
A
(
hwndAvail
,
LB_SETITEMDATA
,
i
,
(
LPARAM
)
btnInfoNew
);
i
=
SendMessage
W
(
hwndAvail
,
LB_INSERTSTRING
,
i
,
0
);
SendMessage
W
(
hwndAvail
,
LB_SETITEMDATA
,
i
,
(
LPARAM
)
btnInfoNew
);
return
;
}
}
/* id higher than all others add to end */
i
=
SendMessage
A
(
hwndAvail
,
LB_ADDSTRING
,
0
,
0
);
SendMessage
A
(
hwndAvail
,
LB_SETITEMDATA
,
i
,
(
LPARAM
)
btnInfoNew
);
i
=
SendMessage
W
(
hwndAvail
,
LB_ADDSTRING
,
0
,
0
);
SendMessage
W
(
hwndAvail
,
LB_SETITEMDATA
,
i
,
(
LPARAM
)
btnInfoNew
);
}
static
void
TOOLBAR_Cust_MoveButton
(
PCUSTDLG_INFO
custInfo
,
HWND
hwnd
,
INT
nIndexFrom
,
INT
nIndexTo
)
{
NMTOOLBAR
A
nmtb
;
NMTOOLBAR
W
nmtb
;
TRACE
(
"index from %d, index to %d
\n
"
,
nIndexFrom
,
nIndexTo
);
...
...
@@ -1807,14 +1807,14 @@ static void TOOLBAR_Cust_MoveButton(PCUSTDLG_INFO custInfo, HWND hwnd, INT nInde
PCUSTOMBUTTON
btnInfo
;
NMHDR
hdr
;
HWND
hwndList
=
GetDlgItem
(
hwnd
,
IDC_TOOLBARBTN_LBOX
);
int
count
=
SendMessage
A
(
hwndList
,
LB_GETCOUNT
,
0
,
0
);
int
count
=
SendMessage
W
(
hwndList
,
LB_GETCOUNT
,
0
,
0
);
btnInfo
=
(
PCUSTOMBUTTON
)
SendMessage
A
(
hwndList
,
LB_GETITEMDATA
,
nIndexFrom
,
0
);
btnInfo
=
(
PCUSTOMBUTTON
)
SendMessage
W
(
hwndList
,
LB_GETITEMDATA
,
nIndexFrom
,
0
);
SendMessage
A
(
hwndList
,
LB_DELETESTRING
,
nIndexFrom
,
0
);
SendMessage
A
(
hwndList
,
LB_INSERTSTRING
,
nIndexTo
,
0
);
SendMessage
A
(
hwndList
,
LB_SETITEMDATA
,
nIndexTo
,
(
LPARAM
)
btnInfo
);
SendMessage
A
(
hwndList
,
LB_SETCURSEL
,
nIndexTo
,
0
);
SendMessage
W
(
hwndList
,
LB_DELETESTRING
,
nIndexFrom
,
0
);
SendMessage
W
(
hwndList
,
LB_INSERTSTRING
,
nIndexTo
,
0
);
SendMessage
W
(
hwndList
,
LB_SETITEMDATA
,
nIndexTo
,
(
LPARAM
)
btnInfo
);
SendMessage
W
(
hwndList
,
LB_SETCURSEL
,
nIndexTo
,
0
);
if
(
nIndexTo
<=
0
)
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_MOVEUP_BTN
),
FALSE
);
...
...
@@ -1827,8 +1827,8 @@ static void TOOLBAR_Cust_MoveButton(PCUSTDLG_INFO custInfo, HWND hwnd, INT nInde
else
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_MOVEDN_BTN
),
TRUE
);
SendMessage
A
(
custInfo
->
tbHwnd
,
TB_DELETEBUTTON
,
nIndexFrom
,
0
);
SendMessage
A
(
custInfo
->
tbHwnd
,
TB_INSERTBUTTONA
,
nIndexTo
,
(
LPARAM
)
&
(
btnInfo
->
btn
));
SendMessage
W
(
custInfo
->
tbHwnd
,
TB_DELETEBUTTON
,
nIndexFrom
,
0
);
SendMessage
W
(
custInfo
->
tbHwnd
,
TB_INSERTBUTTONA
,
nIndexTo
,
(
LPARAM
)
&
(
btnInfo
->
btn
));
TOOLBAR_SendNotify
(
&
hdr
,
custInfo
->
tbInfo
,
TBN_TOOLBARCHANGE
);
}
...
...
@@ -1836,7 +1836,7 @@ static void TOOLBAR_Cust_MoveButton(PCUSTDLG_INFO custInfo, HWND hwnd, INT nInde
static
void
TOOLBAR_Cust_AddButton
(
PCUSTDLG_INFO
custInfo
,
HWND
hwnd
,
INT
nIndexAvail
,
INT
nIndexTo
)
{
NMTOOLBAR
A
nmtb
;
NMTOOLBAR
W
nmtb
;
TRACE
(
"Add: nIndexAvail %d, nIndexTo %d
\n
"
,
nIndexAvail
,
nIndexTo
);
...
...
@@ -1848,18 +1848,18 @@ static void TOOLBAR_Cust_AddButton(PCUSTDLG_INFO custInfo, HWND hwnd, INT nIndex
NMHDR
hdr
;
HWND
hwndList
=
GetDlgItem
(
hwnd
,
IDC_TOOLBARBTN_LBOX
);
HWND
hwndAvail
=
GetDlgItem
(
hwnd
,
IDC_AVAILBTN_LBOX
);
int
count
=
SendMessage
A
(
hwndAvail
,
LB_GETCOUNT
,
0
,
0
);
int
count
=
SendMessage
W
(
hwndAvail
,
LB_GETCOUNT
,
0
,
0
);
btnInfo
=
(
PCUSTOMBUTTON
)
SendMessage
A
(
hwndAvail
,
LB_GETITEMDATA
,
nIndexAvail
,
0
);
btnInfo
=
(
PCUSTOMBUTTON
)
SendMessage
W
(
hwndAvail
,
LB_GETITEMDATA
,
nIndexAvail
,
0
);
if
(
nIndexAvail
!=
0
)
/* index == 0 indicates separator */
{
/* remove from 'available buttons' list */
SendMessage
A
(
hwndAvail
,
LB_DELETESTRING
,
nIndexAvail
,
0
);
SendMessage
W
(
hwndAvail
,
LB_DELETESTRING
,
nIndexAvail
,
0
);
if
(
nIndexAvail
==
count
-
1
)
SendMessage
A
(
hwndAvail
,
LB_SETCURSEL
,
nIndexAvail
-
1
,
0
);
SendMessage
W
(
hwndAvail
,
LB_SETCURSEL
,
nIndexAvail
-
1
,
0
);
else
SendMessage
A
(
hwndAvail
,
LB_SETCURSEL
,
nIndexAvail
,
0
);
SendMessage
W
(
hwndAvail
,
LB_SETCURSEL
,
nIndexAvail
,
0
);
}
else
{
...
...
@@ -1872,10 +1872,10 @@ static void TOOLBAR_Cust_AddButton(PCUSTDLG_INFO custInfo, HWND hwnd, INT nIndex
}
/* insert into 'toolbar button' list */
SendMessage
A
(
hwndList
,
LB_INSERTSTRING
,
nIndexTo
,
0
);
SendMessage
A
(
hwndList
,
LB_SETITEMDATA
,
nIndexTo
,
(
LPARAM
)
btnInfo
);
SendMessage
W
(
hwndList
,
LB_INSERTSTRING
,
nIndexTo
,
0
);
SendMessage
W
(
hwndList
,
LB_SETITEMDATA
,
nIndexTo
,
(
LPARAM
)
btnInfo
);
SendMessage
A
(
custInfo
->
tbHwnd
,
TB_INSERTBUTTONA
,
nIndexTo
,
(
LPARAM
)
&
(
btnInfo
->
btn
));
SendMessage
W
(
custInfo
->
tbHwnd
,
TB_INSERTBUTTONW
,
nIndexTo
,
(
LPARAM
)
&
(
btnInfo
->
btn
));
TOOLBAR_SendNotify
(
&
hdr
,
custInfo
->
tbInfo
,
TBN_TOOLBARCHANGE
);
}
...
...
@@ -1888,17 +1888,17 @@ static void TOOLBAR_Cust_RemoveButton(PCUSTDLG_INFO custInfo, HWND hwnd, INT ind
TRACE
(
"Remove: index %d
\n
"
,
index
);
btnInfo
=
(
PCUSTOMBUTTON
)
SendMessage
A
(
hwndList
,
LB_GETITEMDATA
,
index
,
0
);
btnInfo
=
(
PCUSTOMBUTTON
)
SendMessage
W
(
hwndList
,
LB_GETITEMDATA
,
index
,
0
);
/* send TBN_QUERYDELETE notification */
if
(
TOOLBAR_IsButtonRemovable
(
custInfo
->
tbInfo
,
index
,
btnInfo
))
{
NMHDR
hdr
;
SendMessage
A
(
hwndList
,
LB_DELETESTRING
,
index
,
0
);
SendMessage
A
(
hwndList
,
LB_SETCURSEL
,
index
,
0
);
SendMessage
W
(
hwndList
,
LB_DELETESTRING
,
index
,
0
);
SendMessage
W
(
hwndList
,
LB_SETCURSEL
,
index
,
0
);
SendMessage
A
(
custInfo
->
tbHwnd
,
TB_DELETEBUTTON
,
index
,
0
);
SendMessage
W
(
custInfo
->
tbHwnd
,
TB_DELETEBUTTON
,
index
,
0
);
/* insert into 'available button' list */
if
(
!
(
btnInfo
->
btn
.
fsStyle
&
BTNS_SEP
))
...
...
@@ -1919,7 +1919,7 @@ static LRESULT TOOLBAR_Cust_ToolbarDragListNotification(PCUSTDLG_INFO custInfo,
case
DL_BEGINDRAG
:
{
INT
nCurrentItem
=
LBItemFromPt
(
hwndList
,
pDLI
->
ptCursor
,
TRUE
);
INT
nCount
=
SendMessage
A
(
hwndList
,
LB_GETCOUNT
,
0
,
0
);
INT
nCount
=
SendMessage
W
(
hwndList
,
LB_GETCOUNT
,
0
,
0
);
/* no dragging for last item (separator) */
if
(
nCurrentItem
>=
(
nCount
-
1
))
return
FALSE
;
return
TRUE
;
...
...
@@ -1927,7 +1927,7 @@ static LRESULT TOOLBAR_Cust_ToolbarDragListNotification(PCUSTDLG_INFO custInfo,
case
DL_DRAGGING
:
{
INT
nCurrentItem
=
LBItemFromPt
(
hwndList
,
pDLI
->
ptCursor
,
TRUE
);
INT
nCount
=
SendMessage
A
(
hwndList
,
LB_GETCOUNT
,
0
,
0
);
INT
nCount
=
SendMessage
W
(
hwndList
,
LB_GETCOUNT
,
0
,
0
);
/* no dragging past last item (separator) */
if
((
nCurrentItem
>=
0
)
&&
(
nCurrentItem
<
(
nCount
-
1
)))
{
...
...
@@ -1954,8 +1954,8 @@ static LRESULT TOOLBAR_Cust_ToolbarDragListNotification(PCUSTDLG_INFO custInfo,
case
DL_DROPPED
:
{
INT
nIndexTo
=
LBItemFromPt
(
hwndList
,
pDLI
->
ptCursor
,
TRUE
);
INT
nIndexFrom
=
SendMessage
A
(
hwndList
,
LB_GETCURSEL
,
0
,
0
);
INT
nCount
=
SendMessage
A
(
hwndList
,
LB_GETCOUNT
,
0
,
0
);
INT
nIndexFrom
=
SendMessage
W
(
hwndList
,
LB_GETCURSEL
,
0
,
0
);
INT
nCount
=
SendMessage
W
(
hwndList
,
LB_GETCOUNT
,
0
,
0
);
if
((
nIndexTo
>=
0
)
&&
(
nIndexTo
<
(
nCount
-
1
)))
{
/* clear drag arrow */
...
...
@@ -1993,7 +1993,7 @@ static LRESULT TOOLBAR_Cust_AvailDragListNotification(PCUSTDLG_INFO custInfo, HW
case
DL_BEGINDRAG
:
{
INT
nCurrentItem
=
LBItemFromPt
(
hwndList
,
pDLI
->
ptCursor
,
TRUE
);
INT
nCount
=
SendMessage
A
(
hwndList
,
LB_GETCOUNT
,
0
,
0
);
INT
nCount
=
SendMessage
W
(
hwndList
,
LB_GETCOUNT
,
0
,
0
);
/* no dragging for last item (separator) */
if
(
nCurrentItem
>=
(
nCount
-
1
))
return
FALSE
;
return
TRUE
;
...
...
@@ -2001,7 +2001,7 @@ static LRESULT TOOLBAR_Cust_AvailDragListNotification(PCUSTDLG_INFO custInfo, HW
case
DL_DRAGGING
:
{
INT
nCurrentItem
=
LBItemFromPt
(
hwndList
,
pDLI
->
ptCursor
,
TRUE
);
INT
nCount
=
SendMessage
A
(
hwndList
,
LB_GETCOUNT
,
0
,
0
);
INT
nCount
=
SendMessage
W
(
hwndList
,
LB_GETCOUNT
,
0
,
0
);
/* no dragging past last item (separator) */
if
((
nCurrentItem
>=
0
)
&&
(
nCurrentItem
<
(
nCount
-
1
)))
{
...
...
@@ -2028,8 +2028,8 @@ static LRESULT TOOLBAR_Cust_AvailDragListNotification(PCUSTDLG_INFO custInfo, HW
case
DL_DROPPED
:
{
INT
nIndexTo
=
LBItemFromPt
(
hwndList
,
pDLI
->
ptCursor
,
TRUE
);
INT
nCount
=
SendMessage
A
(
hwndList
,
LB_GETCOUNT
,
0
,
0
);
INT
nIndexFrom
=
SendDlgItemMessage
A
(
hwnd
,
IDC_AVAILBTN_LBOX
,
LB_GETCURSEL
,
0
,
0
);
INT
nCount
=
SendMessage
W
(
hwndList
,
LB_GETCOUNT
,
0
,
0
);
INT
nIndexFrom
=
SendDlgItemMessage
W
(
hwnd
,
IDC_AVAILBTN_LBOX
,
LB_GETCURSEL
,
0
,
0
);
if
((
nIndexTo
>=
0
)
&&
(
nIndexTo
<
(
nCount
-
1
)))
{
/* clear drag arrow */
...
...
@@ -2194,7 +2194,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
MakeDragList
(
GetDlgItem
(
hwnd
,
IDC_AVAILBTN_LBOX
));
/* set focus and disable buttons */
PostMessage
A
(
hwnd
,
WM_USER
,
0
,
0
);
PostMessage
W
(
hwnd
,
WM_USER
,
0
,
0
);
}
return
TRUE
;
...
...
@@ -2476,17 +2476,17 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* FIXME: on windows the size of the images is 25x24 but the size of the bitmap
* in rsrc is only 24x24. Fix the bitmap (how?) and then fix this
*/
SendMessage
A
(
hwnd
,
TB_SETBITMAPSIZE
,
0
,
SendMessage
W
(
hwnd
,
TB_SETBITMAPSIZE
,
0
,
MAKELPARAM
((
WORD
)
24
,
(
WORD
)
24
));
SendMessage
A
(
hwnd
,
TB_SETBUTTONSIZE
,
0
,
SendMessage
W
(
hwnd
,
TB_SETBUTTONSIZE
,
0
,
MAKELPARAM
((
WORD
)
31
,
(
WORD
)
30
));
}
else
{
/* small icons */
SendMessage
A
(
hwnd
,
TB_SETBITMAPSIZE
,
0
,
SendMessage
W
(
hwnd
,
TB_SETBITMAPSIZE
,
0
,
MAKELPARAM
((
WORD
)
16
,
(
WORD
)
16
));
SendMessage
A
(
hwnd
,
TB_SETBUTTONSIZE
,
0
,
SendMessage
W
(
hwnd
,
TB_SETBUTTONSIZE
,
0
,
MAKELPARAM
((
WORD
)
22
,
(
WORD
)
22
));
}
...
...
@@ -2704,16 +2704,16 @@ TOOLBAR_AddButtonsA (HWND hwnd, WPARAM wParam, LPARAM lParam)
btnPtr
->
bHot
=
FALSE
;
if
((
infoPtr
->
hwndToolTip
)
&&
!
(
btnPtr
->
fsStyle
&
BTNS_SEP
))
{
TTTOOLINFO
A
ti
;
TTTOOLINFO
W
ti
;
ZeroMemory
(
&
ti
,
sizeof
(
TTTOOLINFOA
));
ti
.
cbSize
=
sizeof
(
TTTOOLINFOA
);
ZeroMemory
(
&
ti
,
sizeof
(
ti
));
ti
.
cbSize
=
sizeof
(
ti
);
ti
.
hwnd
=
hwnd
;
ti
.
uId
=
btnPtr
->
idCommand
;
ti
.
hinst
=
0
;
ti
.
lpszText
=
LPSTR_TEXTCALLBACK
A
;
ti
.
lpszText
=
LPSTR_TEXTCALLBACK
W
;
SendMessage
A
(
infoPtr
->
hwndToolTip
,
TTM_ADDTOOLA
,
SendMessage
W
(
infoPtr
->
hwndToolTip
,
TTM_ADDTOOLW
,
0
,
(
LPARAM
)
&
ti
);
}
}
...
...
@@ -3206,14 +3206,14 @@ TOOLBAR_DeleteButton (HWND hwnd, WPARAM wParam, LPARAM lParam)
if
((
infoPtr
->
hwndToolTip
)
&&
!
(
infoPtr
->
buttons
[
nIndex
].
fsStyle
&
BTNS_SEP
))
{
TTTOOLINFO
A
ti
;
TTTOOLINFO
W
ti
;
ZeroMemory
(
&
ti
,
sizeof
(
TTTOOLINFOA
));
ti
.
cbSize
=
sizeof
(
TTTOOLINFOA
);
ZeroMemory
(
&
ti
,
sizeof
(
ti
));
ti
.
cbSize
=
sizeof
(
ti
);
ti
.
hwnd
=
hwnd
;
ti
.
uId
=
infoPtr
->
buttons
[
nIndex
].
idCommand
;
SendMessage
A
(
infoPtr
->
hwndToolTip
,
TTM_DELTOOLA
,
0
,
(
LPARAM
)
&
ti
);
SendMessage
W
(
infoPtr
->
hwndToolTip
,
TTM_DELTOOLW
,
0
,
(
LPARAM
)
&
ti
);
}
if
(
infoPtr
->
nNumButtons
==
1
)
{
...
...
@@ -3879,16 +3879,16 @@ TOOLBAR_InsertButtonA (HWND hwnd, WPARAM wParam, LPARAM lParam)
infoPtr
->
buttons
[
nIndex
].
iString
=
lpTbb
->
iString
;
if
((
infoPtr
->
hwndToolTip
)
&&
!
(
lpTbb
->
fsStyle
&
BTNS_SEP
))
{
TTTOOLINFO
A
ti
;
TTTOOLINFO
W
ti
;
ZeroMemory
(
&
ti
,
sizeof
(
TTTOOLINFOA
));
ti
.
cbSize
=
sizeof
(
TTTOOLINFOA
);
ZeroMemory
(
&
ti
,
sizeof
(
ti
));
ti
.
cbSize
=
sizeof
(
ti
);
ti
.
hwnd
=
hwnd
;
ti
.
uId
=
lpTbb
->
idCommand
;
ti
.
hinst
=
0
;
ti
.
lpszText
=
LPSTR_TEXTCALLBACK
A
;
ti
.
lpszText
=
LPSTR_TEXTCALLBACK
W
;
SendMessage
A
(
infoPtr
->
hwndToolTip
,
TTM_ADDTOOLA
,
SendMessage
W
(
infoPtr
->
hwndToolTip
,
TTM_ADDTOOLW
,
0
,
(
LPARAM
)
&
ti
);
}
...
...
@@ -5508,11 +5508,11 @@ TOOLBAR_EraseBackground (HWND hwnd, WPARAM wParam, LPARAM lParam)
parent
=
GetParent
(
hwnd
);
MapWindowPoints
(
hwnd
,
parent
,
&
pt
,
1
);
OffsetWindowOrgEx
(
hdc
,
pt
.
x
,
pt
.
y
,
&
ptorig
);
ret
=
SendMessage
A
(
parent
,
WM_ERASEBKGND
,
wParam
,
lParam
);
ret
=
SendMessage
W
(
parent
,
WM_ERASEBKGND
,
wParam
,
lParam
);
SetWindowOrgEx
(
hdc
,
ptorig
.
x
,
ptorig
.
y
,
0
);
}
if
(
!
ret
)
ret
=
DefWindowProc
A
(
hwnd
,
WM_ERASEBKGND
,
wParam
,
lParam
);
ret
=
DefWindowProc
W
(
hwnd
,
WM_ERASEBKGND
,
wParam
,
lParam
);
if
((
infoPtr
->
dwStyle
&
TBSTYLE_CUSTOMERASE
)
&&
(
infoPtr
->
dwBaseCustDraw
&
CDRF_NOTIFYPOSTERASE
))
{
...
...
@@ -5857,7 +5857,7 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
if
(
btnPtr
->
fsState
&
TBSTATE_ENABLED
)
{
SendMessage
A
(
infoPtr
->
hwndNotify
,
WM_COMMAND
,
SendMessage
W
(
infoPtr
->
hwndNotify
,
WM_COMMAND
,
MAKEWPARAM
(
infoPtr
->
buttons
[
nHit
].
idCommand
,
0
),
(
LPARAM
)
hwnd
);
}
}
...
...
@@ -6064,7 +6064,7 @@ inline static LRESULT
TOOLBAR_NCActivate
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
/* if (wndPtr->dwStyle & CCS_NODIVIDER) */
return
DefWindowProc
A
(
hwnd
,
WM_NCACTIVATE
,
wParam
,
lParam
);
return
DefWindowProc
W
(
hwnd
,
WM_NCACTIVATE
,
wParam
,
lParam
);
/* else */
/* return TOOLBAR_NCPaint (wndPtr, wParam, lParam); */
}
...
...
@@ -6076,7 +6076,7 @@ TOOLBAR_NCCalcSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
if
(
!
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
CCS_NODIVIDER
))
((
LPRECT
)
lParam
)
->
top
+=
GetSystemMetrics
(
SM_CYEDGE
);
return
DefWindowProc
A
(
hwnd
,
WM_NCCALCSIZE
,
wParam
,
lParam
);
return
DefWindowProc
W
(
hwnd
,
WM_NCCALCSIZE
,
wParam
,
lParam
);
}
...
...
@@ -6153,7 +6153,7 @@ TOOLBAR_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
SetWindowLongW
(
hwnd
,
GWL_STYLE
,
cs
->
style
|
styleadd
);
}
return
DefWindowProc
A
(
hwnd
,
WM_NCCREATE
,
wParam
,
lParam
);
return
DefWindowProc
W
(
hwnd
,
WM_NCCREATE
,
wParam
,
lParam
);
}
...
...
@@ -6167,7 +6167,7 @@ TOOLBAR_NCPaint (HWND hwnd, WPARAM wParam, LPARAM lParam)
if
(
dwStyle
&
WS_MINIMIZE
)
return
0
;
/* Nothing to do */
DefWindowProc
A
(
hwnd
,
WM_NCPAINT
,
wParam
,
lParam
);
DefWindowProc
W
(
hwnd
,
WM_NCPAINT
,
wParam
,
lParam
);
if
(
!
(
hdc
=
GetDCEx
(
hwnd
,
0
,
DCX_USESTYLE
|
DCX_WINDOW
)))
return
0
;
...
...
@@ -6389,7 +6389,7 @@ TOOLBAR_NotifyFormat(TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
return
NFR_UNICODE
;
if
(
lParam
==
NF_REQUERY
)
{
i
=
SendMessage
A
(
infoPtr
->
hwndNotify
,
i
=
SendMessage
W
(
infoPtr
->
hwndNotify
,
WM_NOTIFYFORMAT
,
(
WPARAM
)
infoPtr
->
hwndSelf
,
NF_QUERY
);
if
((
i
<
NFR_ANSI
)
||
(
i
>
NFR_UNICODE
))
{
ERR
(
"wrong response to WM_NOTIFYFORMAT (%d), assuming ANSI
\n
"
,
...
...
@@ -6638,7 +6638,7 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
hwnd
,
uMsg
,
/* SPY_GetMsgName(uMsg), */
wParam
,
lParam
);
if
(
!
TOOLBAR_GetInfoPtr
(
hwnd
)
&&
(
uMsg
!=
WM_NCCREATE
))
return
DefWindowProc
A
(
hwnd
,
uMsg
,
wParam
,
lParam
);
return
DefWindowProc
W
(
hwnd
,
uMsg
,
wParam
,
lParam
);
switch
(
uMsg
)
{
...
...
@@ -7018,17 +7018,17 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
WM_DRAWITEM
:
case
WM_MEASUREITEM
:
case
WM_VKEYTOITEM
:
return
SendMessage
A
(
infoPtr
->
hwndNotify
,
uMsg
,
wParam
,
lParam
);
return
SendMessage
W
(
infoPtr
->
hwndNotify
,
uMsg
,
wParam
,
lParam
);
/* We see this in Outlook Express 5.x and just does DefWindowProc */
case
PGM_FORWARDMOUSE
:
return
DefWindowProc
A
(
hwnd
,
uMsg
,
wParam
,
lParam
);
return
DefWindowProc
W
(
hwnd
,
uMsg
,
wParam
,
lParam
);
default
:
if
((
uMsg
>=
WM_USER
)
&&
(
uMsg
<
WM_APP
))
ERR
(
"unknown msg %04x wp=%08x lp=%08lx
\n
"
,
uMsg
,
wParam
,
lParam
);
return
DefWindowProc
A
(
hwnd
,
uMsg
,
wParam
,
lParam
);
return
DefWindowProc
W
(
hwnd
,
uMsg
,
wParam
,
lParam
);
}
return
0
;
}
...
...
@@ -7037,25 +7037,25 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
VOID
TOOLBAR_Register
(
void
)
{
WNDCLASS
A
wndClass
;
WNDCLASS
W
wndClass
;
ZeroMemory
(
&
wndClass
,
sizeof
(
WNDCLASS
A
));
ZeroMemory
(
&
wndClass
,
sizeof
(
WNDCLASS
W
));
wndClass
.
style
=
CS_GLOBALCLASS
|
CS_DBLCLKS
;
wndClass
.
lpfnWndProc
=
(
WNDPROC
)
ToolbarWindowProc
;
wndClass
.
lpfnWndProc
=
ToolbarWindowProc
;
wndClass
.
cbClsExtra
=
0
;
wndClass
.
cbWndExtra
=
sizeof
(
TOOLBAR_INFO
*
);
wndClass
.
hCursor
=
LoadCursor
A
(
0
,
(
LP
STR
)
IDC_ARROW
);
wndClass
.
hbrBackground
=
(
HBRUSH
)(
COLOR_
3D
FACE
+
1
);
wndClass
.
lpszClassName
=
TOOLBARCLASSNAME
A
;
wndClass
.
hCursor
=
LoadCursor
W
(
0
,
(
LPW
STR
)
IDC_ARROW
);
wndClass
.
hbrBackground
=
(
HBRUSH
)(
COLOR_
BTN
FACE
+
1
);
wndClass
.
lpszClassName
=
TOOLBARCLASSNAME
W
;
RegisterClass
A
(
&
wndClass
);
RegisterClass
W
(
&
wndClass
);
}
VOID
TOOLBAR_Unregister
(
void
)
{
UnregisterClass
A
(
TOOLBARCLASSNAMEA
,
NULL
);
UnregisterClass
W
(
TOOLBARCLASSNAMEW
,
NULL
);
}
static
HIMAGELIST
TOOLBAR_InsertImageList
(
PIMLENTRY
**
pies
,
INT
*
cies
,
HIMAGELIST
himl
,
INT
id
)
...
...
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