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
8d2933d3
Commit
8d2933d3
authored
Nov 22, 1998
by
Eric Kohl
Committed by
Alexandre Julliard
Nov 22, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Unicode support (at least partially).
parent
f9d92882
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
383 additions
and
57 deletions
+383
-57
header.c
dlls/comctl32/header.c
+256
-19
status.c
dlls/comctl32/status.c
+0
-0
toolbar.c
dlls/comctl32/toolbar.c
+94
-23
commctrl.h
include/commctrl.h
+22
-8
header.h
include/header.h
+2
-1
listview.h
include/listview.h
+1
-0
ole2.h
include/ole2.h
+1
-1
rebar.h
include/rebar.h
+2
-1
status.h
include/status.h
+2
-1
toolbar.h
include/toolbar.h
+1
-1
tooltips.h
include/tooltips.h
+2
-2
No files found.
dlls/comctl32/header.c
View file @
8d2933d3
This diff is collapsed.
Click to expand it.
dlls/comctl32/status.c
View file @
8d2933d3
This diff is collapsed.
Click to expand it.
dlls/comctl32/toolbar.c
View file @
8d2933d3
...
...
@@ -83,21 +83,21 @@ TOOLBAR_DrawString (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
if
(
!
(
nState
&
TBSTATE_ENABLED
))
{
clrOld
=
SetTextColor32
(
hdc
,
GetSysColor32
(
COLOR_3DHILIGHT
));
OffsetRect32
(
&
rcText
,
1
,
1
);
DrawText32
A
(
hdc
,
infoPtr
->
strings
[
btnPtr
->
iString
],
-
1
,
DrawText32
W
(
hdc
,
infoPtr
->
strings
[
btnPtr
->
iString
],
-
1
,
&
rcText
,
infoPtr
->
dwDTFlags
);
SetTextColor32
(
hdc
,
GetSysColor32
(
COLOR_3DSHADOW
));
OffsetRect32
(
&
rcText
,
-
1
,
-
1
);
DrawText32
A
(
hdc
,
infoPtr
->
strings
[
btnPtr
->
iString
],
-
1
,
DrawText32
W
(
hdc
,
infoPtr
->
strings
[
btnPtr
->
iString
],
-
1
,
&
rcText
,
infoPtr
->
dwDTFlags
);
}
else
if
(
nState
&
TBSTATE_INDETERMINATE
)
{
clrOld
=
SetTextColor32
(
hdc
,
GetSysColor32
(
COLOR_3DSHADOW
));
DrawText32
A
(
hdc
,
infoPtr
->
strings
[
btnPtr
->
iString
],
-
1
,
DrawText32
W
(
hdc
,
infoPtr
->
strings
[
btnPtr
->
iString
],
-
1
,
&
rcText
,
infoPtr
->
dwDTFlags
);
}
else
{
clrOld
=
SetTextColor32
(
hdc
,
GetSysColor32
(
COLOR_BTNTEXT
));
DrawText32
A
(
hdc
,
infoPtr
->
strings
[
btnPtr
->
iString
],
-
1
,
DrawText32
W
(
hdc
,
infoPtr
->
strings
[
btnPtr
->
iString
],
-
1
,
&
rcText
,
infoPtr
->
dwDTFlags
);
}
...
...
@@ -292,8 +292,8 @@ TOOLBAR_CalcStrings (WND *wndPtr, LPSIZE32 lpSize)
if
(
!
(
btnPtr
->
fsState
&
TBSTATE_HIDDEN
)
&&
(
btnPtr
->
iString
>
-
1
)
&&
(
btnPtr
->
iString
<
infoPtr
->
nNumStrings
))
{
LPSTR
lpText
=
infoPtr
->
strings
[
btnPtr
->
iString
];
GetTextExtentPoint32
A
(
hdc
,
lpText
,
lstrlen32A
(
lpText
),
&
sz
);
LP
W
STR
lpText
=
infoPtr
->
strings
[
btnPtr
->
iString
];
GetTextExtentPoint32
W
(
hdc
,
lpText
,
lstrlen32W
(
lpText
),
&
sz
);
if
(
sz
.
cx
>
lpSize
->
cx
)
lpSize
->
cx
=
sz
.
cx
;
if
(
sz
.
cy
>
lpSize
->
cy
)
...
...
@@ -753,27 +753,28 @@ TOOLBAR_AddString32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
nIndex
=
infoPtr
->
nNumStrings
;
if
(
infoPtr
->
nNumStrings
==
0
)
{
infoPtr
->
strings
=
COMCTL32_Alloc
(
sizeof
(
char
*
));
COMCTL32_Alloc
(
sizeof
(
LPWSTR
));
}
else
{
char
*
*
oldStrings
=
infoPtr
->
strings
;
LPWSTR
*
oldStrings
=
infoPtr
->
strings
;
infoPtr
->
strings
=
COMCTL32_Alloc
(
sizeof
(
char
*
)
*
(
infoPtr
->
nNumStrings
+
1
));
COMCTL32_Alloc
(
sizeof
(
LPWSTR
)
*
(
infoPtr
->
nNumStrings
+
1
));
memcpy
(
&
infoPtr
->
strings
[
0
],
&
oldStrings
[
0
],
sizeof
(
char
*
)
*
infoPtr
->
nNumStrings
);
sizeof
(
LPWSTR
)
*
infoPtr
->
nNumStrings
);
COMCTL32_Free
(
oldStrings
);
}
infoPtr
->
strings
[
infoPtr
->
nNumStrings
]
=
COMCTL32_Alloc
(
sizeof
(
char
)
*
(
len
+
1
));
lstrcpy
32A
(
infoPtr
->
strings
[
infoPtr
->
nNumStrings
],
szString
);
COMCTL32_Alloc
(
sizeof
(
WCHAR
)
*
(
len
+
1
));
lstrcpy
AtoW
(
infoPtr
->
strings
[
infoPtr
->
nNumStrings
],
szString
);
infoPtr
->
nNumStrings
++
;
}
else
{
char
*
p
=
(
char
*
)
lParam
;
LPSTR
p
=
(
LPSTR
)
lParam
;
INT32
len
;
if
(
p
==
NULL
)
return
-
1
;
if
(
p
==
NULL
)
return
-
1
;
TRACE
(
toolbar
,
"adding string(s) from array!
\n
"
);
nIndex
=
infoPtr
->
nNumStrings
;
while
(
*
p
)
{
...
...
@@ -782,20 +783,20 @@ TOOLBAR_AddString32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
if
(
infoPtr
->
nNumStrings
==
0
)
{
infoPtr
->
strings
=
COMCTL32_Alloc
(
sizeof
(
char
*
));
COMCTL32_Alloc
(
sizeof
(
LPWSTR
));
}
else
{
char
*
*
oldStrings
=
infoPtr
->
strings
;
LPWSTR
*
oldStrings
=
infoPtr
->
strings
;
infoPtr
->
strings
=
COMCTL32_Alloc
(
sizeof
(
char
*
)
*
(
infoPtr
->
nNumStrings
+
1
));
COMCTL32_Alloc
(
sizeof
(
LPWSTR
)
*
(
infoPtr
->
nNumStrings
+
1
));
memcpy
(
&
infoPtr
->
strings
[
0
],
&
oldStrings
[
0
],
sizeof
(
char
*
)
*
infoPtr
->
nNumStrings
);
sizeof
(
LPWSTR
)
*
infoPtr
->
nNumStrings
);
COMCTL32_Free
(
oldStrings
);
}
infoPtr
->
strings
[
infoPtr
->
nNumStrings
]
=
COMCTL32_Alloc
(
sizeof
(
char
)
*
(
len
+
1
));
lstrcpy
32A
(
infoPtr
->
strings
[
infoPtr
->
nNumStrings
],
p
);
COMCTL32_Alloc
(
sizeof
(
WCHAR
)
*
(
len
+
1
));
lstrcpy
AtoW
(
infoPtr
->
strings
[
infoPtr
->
nNumStrings
],
p
);
infoPtr
->
nNumStrings
++
;
p
+=
(
len
+
1
);
...
...
@@ -806,7 +807,76 @@ TOOLBAR_AddString32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
// << TOOLBAR_AddString32W >>
static
LRESULT
TOOLBAR_AddString32W
(
WND
*
wndPtr
,
WPARAM32
wParam
,
LPARAM
lParam
)
{
TOOLBAR_INFO
*
infoPtr
=
TOOLBAR_GetInfoPtr
(
wndPtr
);
INT32
nIndex
;
if
((
wParam
)
&&
(
HIWORD
(
lParam
)
==
0
))
{
WCHAR
szString
[
256
];
INT32
len
;
TRACE
(
toolbar
,
"adding string from resource!
\n
"
);
len
=
LoadString32W
((
HINSTANCE32
)
wParam
,
(
UINT32
)
lParam
,
szString
,
256
);
TRACE
(
toolbar
,
"len=%d
\"
%s
\"\n
"
,
len
,
debugstr_w
(
szString
));
nIndex
=
infoPtr
->
nNumStrings
;
if
(
infoPtr
->
nNumStrings
==
0
)
{
infoPtr
->
strings
=
COMCTL32_Alloc
(
sizeof
(
LPWSTR
));
}
else
{
LPWSTR
*
oldStrings
=
infoPtr
->
strings
;
infoPtr
->
strings
=
COMCTL32_Alloc
(
sizeof
(
LPWSTR
)
*
(
infoPtr
->
nNumStrings
+
1
));
memcpy
(
&
infoPtr
->
strings
[
0
],
&
oldStrings
[
0
],
sizeof
(
LPWSTR
)
*
infoPtr
->
nNumStrings
);
COMCTL32_Free
(
oldStrings
);
}
infoPtr
->
strings
[
infoPtr
->
nNumStrings
]
=
COMCTL32_Alloc
(
sizeof
(
WCHAR
)
*
(
len
+
1
));
lstrcpy32W
(
infoPtr
->
strings
[
infoPtr
->
nNumStrings
],
szString
);
infoPtr
->
nNumStrings
++
;
}
else
{
LPWSTR
p
=
(
LPWSTR
)
lParam
;
INT32
len
;
if
(
p
==
NULL
)
return
-
1
;
TRACE
(
toolbar
,
"adding string(s) from array!
\n
"
);
nIndex
=
infoPtr
->
nNumStrings
;
while
(
*
p
)
{
len
=
lstrlen32W
(
p
);
TRACE
(
toolbar
,
"len=%d
\"
%s
\"\n
"
,
len
,
debugstr_w
(
p
));
if
(
infoPtr
->
nNumStrings
==
0
)
{
infoPtr
->
strings
=
COMCTL32_Alloc
(
sizeof
(
LPWSTR
));
}
else
{
LPWSTR
*
oldStrings
=
infoPtr
->
strings
;
infoPtr
->
strings
=
COMCTL32_Alloc
(
sizeof
(
LPWSTR
)
*
(
infoPtr
->
nNumStrings
+
1
));
memcpy
(
&
infoPtr
->
strings
[
0
],
&
oldStrings
[
0
],
sizeof
(
LPWSTR
)
*
infoPtr
->
nNumStrings
);
COMCTL32_Free
(
oldStrings
);
}
infoPtr
->
strings
[
infoPtr
->
nNumStrings
]
=
COMCTL32_Alloc
(
sizeof
(
WCHAR
)
*
(
len
+
1
));
lstrcpy32W
(
infoPtr
->
strings
[
infoPtr
->
nNumStrings
],
p
);
infoPtr
->
nNumStrings
++
;
p
+=
(
len
+
1
);
}
}
return
nIndex
;
}
static
LRESULT
...
...
@@ -2055,7 +2125,7 @@ TOOLBAR_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
infoPtr
->
cxMax
=
-
1
;
infoPtr
->
bCaptured
=
FALSE
;
infoPtr
->
bUnicode
=
FALSE
;
infoPtr
->
bUnicode
=
IsWindowUnicode
(
wndPtr
->
hwndSelf
)
;
infoPtr
->
nButtonDown
=
-
1
;
infoPtr
->
nOldHit
=
-
1
;
...
...
@@ -2555,7 +2625,8 @@ ToolbarWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
case
TB_ADDSTRING32A
:
return
TOOLBAR_AddString32A
(
wndPtr
,
wParam
,
lParam
);
// case TB_ADDSTRING32W:
case
TB_ADDSTRING32W
:
return
TOOLBAR_AddString32W
(
wndPtr
,
wParam
,
lParam
);
case
TB_AUTOSIZE
:
return
TOOLBAR_AutoSize
(
wndPtr
,
wParam
,
lParam
);
...
...
include/commctrl.h
View file @
8d2933d3
...
...
@@ -141,7 +141,6 @@ typedef struct tagNMTOOLTIPSCREATED
#define SB_GETTEXTLENGTH32A (WM_USER+3)
#define SB_GETTEXTLENGTH32W (WM_USER+12)
#define SB_GETTEXTLENGTH WINELIB_NAME_AW(SB_GETTEXTLENGTH)
#define SB_SETPARTS (WM_USER+4)
#define SB_GETPARTS (WM_USER+6)
#define SB_GETBORDERS (WM_USER+7)
...
...
@@ -158,6 +157,8 @@ typedef struct tagNMTOOLTIPSCREATED
#define SB_GETTIPTEXT WINELIB_NAME_AW(SB_GETTIPTEXT)
#define SB_GETICON (WM_USER+20)
#define SB_SETBKCOLOR CCM_SETBKCOLOR
/* lParam = bkColor */
#define SB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
#define SB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
#define SBN_FIRST (0U-880U)
#define SBN_LAST (0U-899U)
...
...
@@ -1160,11 +1161,11 @@ typedef struct tagNMTTDISPINFOW
#define RB_SETPALETTE (WM_USER+37)
#define RB_GETPALETTE (WM_USER+38)
#define RB_MOVEBAND (WM_USER+39)
#define RB_GETDROPTARGET CC
S
_GETDROPTARGET
#define RB_SETCOLORSCHEME CC
S
_SETCOLORSCHEME
#define RB_GETCOLORSCHEME CC
S
_GETCOLORSCHEME
#define RB_SETUNICODEFORMAT CC
S
_SETUNICODEFORMAT
#define RB_GETUNICODEFORMAT CC
S
_GETUNICODEFORMAT
#define RB_GETDROPTARGET CC
M
_GETDROPTARGET
#define RB_SETCOLORSCHEME CC
M
_SETCOLORSCHEME
#define RB_GETCOLORSCHEME CC
M
_GETCOLORSCHEME
#define RB_SETUNICODEFORMAT CC
M
_SETUNICODEFORMAT
#define RB_GETUNICODEFORMAT CC
M
_GETUNICODEFORMAT
#define RBN_FIRST (0U-831U)
#define RBN_LAST (0U-859U)
...
...
@@ -1218,7 +1219,7 @@ typedef struct tagREBARBANDINFOW
UINT32
fStyle
;
COLORREF
clrFore
;
COLORREF
clrBack
;
LP
STR
lpText
;
LP
WSTR
lpText
;
UINT32
cch
;
INT32
iImage
;
HWND32
hwndChild
;
...
...
@@ -1248,7 +1249,7 @@ typedef REBARBANDINFO32W const *LPCREBARBANDINFO32W;
typedef
struct
tagNMREBARCHILDSIZE
{
NMHDR
hdr
;
UINT32
i
Band
;
UINT32
u
Band
;
UINT32
wID
;
RECT32
rcChild
;
RECT32
rcBand
;
...
...
@@ -2443,6 +2444,10 @@ LPVOID WINAPI DSA_GetItemPtr (const HDSA, INT32);
INT32
WINAPI
DSA_InsertItem
(
const
HDSA
,
INT32
,
LPVOID
);
BOOL32
WINAPI
DSA_SetItem
(
const
HDSA
,
INT32
,
LPVOID
);
typedef
INT32
(
CALLBACK
*
DSAENUMPROC
)(
LPVOID
,
DWORD
);
VOID
WINAPI
DSA_EnumCallback
(
const
HDSA
,
DSAENUMPROC
,
LPARAM
);
BOOL32
WINAPI
DSA_DestroyCallback
(
const
HDSA
,
DSAENUMPROC
,
LPARAM
);
/* Dynamic Pointer Array */
...
...
@@ -2476,6 +2481,15 @@ BOOL32 WINAPI DPA_Sort (const HDPA, PFNDPACOMPARE, LPARAM);
INT32
WINAPI
DPA_Search
(
const
HDPA
,
LPVOID
,
INT32
,
PFNDPACOMPARE
,
LPARAM
,
UINT32
);
#define DPAM_SORT 0x0001
BOOL32
WINAPI
DPA_Merge
(
const
HDPA
,
const
HDPA
,
DWORD
,
PFNDPACOMPARE
,
LPVOID
,
LPARAM
);
typedef
INT32
(
CALLBACK
*
DPAENUMPROC
)(
LPVOID
,
DWORD
);
VOID
WINAPI
DPA_EnumCallback
(
const
HDPA
,
DPAENUMPROC
,
LPARAM
);
BOOL32
WINAPI
DPA_DestroyCallback
(
const
HDPA
,
DPAENUMPROC
,
LPARAM
);
#define DPA_GetPtrCount(hdpa) (*(INT32*)(hdpa))
#define DPA_GetPtrPtr(hdpa) (*((LPVOID**)((BYTE*)(hdpa)+sizeof(INT32))))
#define DPA_FastGetPtr(hdpa,i) (DPA_GetPtrPtr(hdpa)[i])
...
...
include/header.h
View file @
8d2933d3
...
...
@@ -12,7 +12,7 @@ typedef struct
{
INT32
cxy
;
HBITMAP32
hbm
;
LP
STR
pszText
;
LP
WSTR
pszText
;
INT32
fmt
;
LPARAM
lParam
;
INT32
iImage
;
...
...
@@ -34,6 +34,7 @@ typedef struct
BOOL32
bCaptured
;
/* Is the mouse captured? */
BOOL32
bPressed
;
/* Is a header item pressed (down)? */
BOOL32
bTracking
;
/* Is in tracking mode? */
BOOL32
bUnicode
;
/* Unicode flag */
INT32
iMoveItem
;
/* index of tracked item. (Tracking mode) */
INT32
xTrackOffset
;
/* distance between the right side of the tracked item and the cursor */
INT32
xOldTrack
;
/* track offset (see above) after the last WM_MOUSEMOVE */
...
...
include/listview.h
View file @
8d2933d3
...
...
@@ -35,6 +35,7 @@ typedef struct tagLISTVIEW_INFO
RECT32
rcList
;
/* "client" area of the list (without header) */
BOOL32
bFocus
;
DWORD
dwExStyle
;
/* extended listview style */
HDPA
hdpaItems
;
}
LISTVIEW_INFO
;
...
...
include/ole2.h
View file @
8d2933d3
...
...
@@ -8,7 +8,7 @@
/* to be implemented */
typedef
LPVOID
LPMESSAGEFILTER
;
typedef
LPVOID
LPDROPTARGET
;
typedef
LPVOID
LPMONIKER
;
typedef
struct
tagMONIKER
*
LPMONIKER
,
IMoniker
;
#define S_OK 0
#define S_FALSE 1
...
...
include/rebar.h
View file @
8d2933d3
...
...
@@ -34,7 +34,7 @@ typedef struct tagREBAR_BAND
RECT32
rcCapText
;
/* calculated caption text rectangle */
RECT32
rcChild
;
/* calculated child rectangle */
LP
STR
lpText
;
LP
WSTR
lpText
;
HWND32
hwndPrevParent
;
}
REBAR_BAND
;
...
...
@@ -51,6 +51,7 @@ typedef struct tagREBAR_INFO
SIZE32
calcSize
;
/* calculated rebar size */
BOOL32
bAutoResize
;
/* auto resize deadlock flag */
BOOL32
bUnicode
;
/* Unicode flag */
HCURSOR32
hcurArrow
;
/* handle to the arrow cursor */
HCURSOR32
hcurHorz
;
/* handle to the EW cursor */
HCURSOR32
hcurVert
;
/* handle to the NS cursor */
...
...
include/status.h
View file @
8d2933d3
...
...
@@ -12,7 +12,7 @@ typedef struct
INT32
x
;
INT32
style
;
RECT32
bound
;
LPSTR
text
;
LP
W
STR
text
;
HICON32
hIcon
;
}
STATUSWINDOWPART
;
...
...
@@ -26,6 +26,7 @@ typedef struct
HFONT32
hFont
;
HFONT32
hDefaultFont
;
COLORREF
clrBk
;
/* background color */
BOOL32
bUnicode
;
/* unicode flag */
STATUSWINDOWPART
part0
;
/* simple window */
STATUSWINDOWPART
*
parts
;
}
STATUSWINDOWINFO
;
...
...
include/toolbar.h
View file @
8d2933d3
...
...
@@ -60,7 +60,7 @@ typedef struct tagTOOLBAR_INFO
RECT32
rcBound
;
/* bounding rectangle */
TBUTTON_INFO
*
buttons
;
/* pointer to button array */
CHAR
**
strings
;
LPWSTR
*
strings
;
/* pointer to string array */
}
TOOLBAR_INFO
;
...
...
include/tooltips.h
View file @
8d2933d3
...
...
@@ -23,14 +23,14 @@ typedef struct tagTTTOOL_INFO
UINT32
uId
;
RECT32
rect
;
HINSTANCE32
hinst
;
LP
STR
lpszText
;
LP
WSTR
lpszText
;
LPARAM
lParam
;
}
TTTOOL_INFO
;
typedef
struct
tagTOOLTIPS_INFO
{
CHAR
szTipText
[
INFOTIPSIZE
];
WCHAR
szTipText
[
INFOTIPSIZE
];
BOOL32
bActive
;
BOOL32
bTrackActive
;
UINT32
uNumTools
;
...
...
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