Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2c236638
Commit
2c236638
authored
Mar 23, 2005
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Mar 23, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Complete unicodification of the rebar common control.
parent
2fbd839e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
30 deletions
+29
-30
rebar.c
dlls/comctl32/rebar.c
+29
-30
No files found.
dlls/comctl32/rebar.c
View file @
2c236638
...
...
@@ -17,6 +17,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* NOTES
*
* This code was audited for completeness against the documented features
* of Comctl32.dll version 6.0 on Oct. 19, 2004, by Robert Shearman.
...
...
@@ -1245,8 +1246,9 @@ REBAR_ForceResize (REBAR_INFO *infoPtr)
static
VOID
REBAR_MoveChildWindows
(
REBAR_INFO
*
infoPtr
,
UINT
start
,
UINT
endplus
)
{
const
static
WCHAR
strComboBox
[]
=
{
'C'
,
'o'
,
'm'
,
'b'
,
'o'
,
'B'
,
'o'
,
'x'
,
0
};
REBAR_BAND
*
lpBand
;
CHAR
szClassName
[
40
];
W
CHAR
szClassName
[
40
];
UINT
i
;
NMREBARCHILDSIZE
rbcz
;
NMHDR
heightchange
;
...
...
@@ -1291,9 +1293,9 @@ REBAR_MoveChildWindows (REBAR_INFO *infoPtr, UINT start, UINT endplus)
* set flag outside of loop
*/
GetClassName
A
(
lpBand
->
hwndChild
,
szClassName
,
40
);
if
(
!
lstrcmp
A
(
szClassName
,
"ComboBox"
)
||
!
lstrcmp
A
(
szClassName
,
WC_COMBOBOXEXA
))
{
GetClassName
W
(
lpBand
->
hwndChild
,
szClassName
,
sizeof
(
szClassName
)
/
sizeof
(
szClassName
[
0
])
);
if
(
!
lstrcmp
W
(
szClassName
,
strComboBox
)
||
!
lstrcmp
W
(
szClassName
,
WC_COMBOBOXEXW
))
{
INT
nEditHeight
,
yPos
;
RECT
rc
;
...
...
@@ -2276,7 +2278,7 @@ REBAR_InternalEraseBkGnd (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam, REC
lpBand
->
rcBand
.
right
,
lpBand
->
rcBand
.
bottom
,
clip
->
left
,
clip
->
top
,
clip
->
right
,
clip
->
bottom
);
ExtTextOut
A
(
hdc
,
0
,
0
,
ETO_OPAQUE
,
&
rect
,
NULL
,
0
,
0
);
ExtTextOut
W
(
hdc
,
0
,
0
,
ETO_OPAQUE
,
&
rect
,
NULL
,
0
,
0
);
if
(
lpBand
->
clrBack
!=
CLR_NONE
)
SetBkColor
(
hdc
,
old
);
}
...
...
@@ -3755,7 +3757,7 @@ REBAR_SizeToRect (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
static
LRESULT
REBAR_Create
(
REBAR_INFO
*
infoPtr
,
WPARAM
wParam
,
LPARAM
lParam
)
{
LPCREATESTRUCT
A
cs
=
(
LPCREATESTRUCTA
)
lParam
;
LPCREATESTRUCT
W
cs
=
(
LPCREATESTRUCTW
)
lParam
;
RECT
wnrc1
,
clrc1
;
if
(
TRACE_ON
(
rebar
))
{
...
...
@@ -4063,10 +4065,10 @@ REBAR_NCCalcSize (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
static
LRESULT
REBAR_NCCreate
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
LPCREATESTRUCT
A
cs
=
(
LPCREATESTRUCTA
)
lParam
;
LPCREATESTRUCT
W
cs
=
(
LPCREATESTRUCTW
)
lParam
;
REBAR_INFO
*
infoPtr
=
REBAR_GetInfoPtr
(
hwnd
);
RECT
wnrc1
,
clrc1
;
NONCLIENTMETRICS
A
ncm
;
NONCLIENTMETRICS
W
ncm
;
HFONT
tfont
;
INT
i
;
...
...
@@ -4098,37 +4100,35 @@ REBAR_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
infoPtr
->
iGrabbedBand
=
-
1
;
infoPtr
->
hwndSelf
=
hwnd
;
infoPtr
->
DoRedraw
=
TRUE
;
infoPtr
->
hcurArrow
=
LoadCursor
A
(
0
,
(
LP
STR
)
IDC_ARROW
);
infoPtr
->
hcurHorz
=
LoadCursor
A
(
0
,
(
LP
STR
)
IDC_SIZEWE
);
infoPtr
->
hcurVert
=
LoadCursor
A
(
0
,
(
LP
STR
)
IDC_SIZENS
);
infoPtr
->
hcurDrag
=
LoadCursor
A
(
0
,
(
LP
STR
)
IDC_SIZE
);
infoPtr
->
hcurArrow
=
LoadCursor
W
(
0
,
(
LPW
STR
)
IDC_ARROW
);
infoPtr
->
hcurHorz
=
LoadCursor
W
(
0
,
(
LPW
STR
)
IDC_SIZEWE
);
infoPtr
->
hcurVert
=
LoadCursor
W
(
0
,
(
LPW
STR
)
IDC_SIZENS
);
infoPtr
->
hcurDrag
=
LoadCursor
W
(
0
,
(
LPW
STR
)
IDC_SIZE
);
infoPtr
->
bUnicode
=
IsWindowUnicode
(
hwnd
);
infoPtr
->
fStatus
=
CREATE_RUNNING
;
infoPtr
->
hFont
=
GetStockObject
(
SYSTEM_FONT
);
/* issue WM_NOTIFYFORMAT to get unicode status of parent */
i
=
SendMessage
A
(
REBAR_GetNotifyParent
(
infoPtr
),
i
=
SendMessage
W
(
REBAR_GetNotifyParent
(
infoPtr
),
WM_NOTIFYFORMAT
,
(
WPARAM
)
hwnd
,
NF_QUERY
);
if
((
i
<
NFR_ANSI
)
||
(
i
>
NFR_UNICODE
))
{
ERR
(
"wrong response to WM_NOTIFYFORMAT (%d), assuming ANSI
\n
"
,
i
);
ERR
(
"wrong response to WM_NOTIFYFORMAT (%d), assuming ANSI
\n
"
,
i
);
i
=
NFR_ANSI
;
}
infoPtr
->
NtfUnicode
=
(
i
==
NFR_UNICODE
)
?
1
:
0
;
/* add necessary styles to the requested styles */
infoPtr
->
dwStyle
=
cs
->
style
|
WS_VISIBLE
|
CCS_TOP
;
SetWindowLong
A
(
hwnd
,
GWL_STYLE
,
infoPtr
->
dwStyle
);
SetWindowLong
W
(
hwnd
,
GWL_STYLE
,
infoPtr
->
dwStyle
);
/* get font handle for Caption Font */
ncm
.
cbSize
=
sizeof
(
NONCLIENTMETRICSA
);
SystemParametersInfoA
(
SPI_GETNONCLIENTMETRICS
,
ncm
.
cbSize
,
&
ncm
,
0
);
SystemParametersInfoW
(
SPI_GETNONCLIENTMETRICS
,
ncm
.
cbSize
,
&
ncm
,
0
);
/* if the font is bold, set to normal */
if
(
ncm
.
lfCaptionFont
.
lfWeight
>
FW_NORMAL
)
{
ncm
.
lfCaptionFont
.
lfWeight
=
FW_NORMAL
;
}
tfont
=
CreateFontIndirect
A
(
&
ncm
.
lfCaptionFont
);
tfont
=
CreateFontIndirect
W
(
&
ncm
.
lfCaptionFont
);
if
(
tfont
)
{
infoPtr
->
hFont
=
infoPtr
->
hDefaultFont
=
tfont
;
}
...
...
@@ -4228,11 +4228,10 @@ REBAR_NotifyFormat (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
INT
i
;
if
(
lParam
==
NF_REQUERY
)
{
i
=
SendMessage
A
(
REBAR_GetNotifyParent
(
infoPtr
),
i
=
SendMessage
W
(
REBAR_GetNotifyParent
(
infoPtr
),
WM_NOTIFYFORMAT
,
(
WPARAM
)
infoPtr
->
hwndSelf
,
NF_QUERY
);
if
((
i
<
NFR_ANSI
)
||
(
i
>
NFR_UNICODE
))
{
ERR
(
"wrong response to WM_NOTIFYFORMAT (%d), assuming ANSI
\n
"
,
i
);
ERR
(
"wrong response to WM_NOTIFYFORMAT (%d), assuming ANSI
\n
"
,
i
);
i
=
NFR_ANSI
;
}
infoPtr
->
NtfUnicode
=
(
i
==
NFR_UNICODE
)
?
1
:
0
;
...
...
@@ -4473,7 +4472,7 @@ REBAR_WindowPosChanged (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
/* Save the new origin of this window - used by _ForceResize */
infoPtr
->
origin
.
x
=
lpwp
->
x
;
infoPtr
->
origin
.
y
=
lpwp
->
y
;
ret
=
DefWindowProc
A
(
infoPtr
->
hwndSelf
,
WM_WINDOWPOSCHANGED
,
ret
=
DefWindowProc
W
(
infoPtr
->
hwndSelf
,
WM_WINDOWPOSCHANGED
,
wParam
,
lParam
);
GetWindowRect
(
infoPtr
->
hwndSelf
,
&
rc
);
TRACE
(
"hwnd %p new pos (%ld,%ld)-(%ld,%ld)
\n
"
,
...
...
@@ -4490,7 +4489,7 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
TRACE
(
"hwnd=%p msg=%x wparam=%x lparam=%lx
\n
"
,
hwnd
,
uMsg
,
wParam
,
lParam
);
if
(
!
infoPtr
&&
(
uMsg
!=
WM_NCCREATE
))
return
DefWindowProcA
(
hwnd
,
uMsg
,
wParam
,
lParam
);
return
DefWindowProcW
(
hwnd
,
uMsg
,
wParam
,
lParam
);
switch
(
uMsg
)
{
/* case RB_BEGINDRAG: */
...
...
@@ -4707,7 +4706,7 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
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
);
}
}
...
...
@@ -4715,9 +4714,9 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
VOID
REBAR_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
=
REBAR_WindowProc
;
wndClass
.
cbClsExtra
=
0
;
...
...
@@ -4727,9 +4726,9 @@ REBAR_Register (void)
#if GLATESTING
wndClass
.
hbrBackground
=
CreateSolidBrush
(
RGB
(
0
,
128
,
0
));
#endif
wndClass
.
lpszClassName
=
REBARCLASSNAME
A
;
wndClass
.
lpszClassName
=
REBARCLASSNAME
W
;
RegisterClass
A
(
&
wndClass
);
RegisterClass
W
(
&
wndClass
);
mindragx
=
GetSystemMetrics
(
SM_CXDRAG
);
mindragy
=
GetSystemMetrics
(
SM_CYDRAG
);
...
...
@@ -4740,5 +4739,5 @@ REBAR_Register (void)
VOID
REBAR_Unregister
(
void
)
{
UnregisterClass
A
(
REBARCLASSNAMEA
,
NULL
);
UnregisterClass
W
(
REBARCLASSNAMEW
,
NULL
);
}
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