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
07a308d6
Commit
07a308d6
authored
Apr 11, 2002
by
Uwe Bonnes
Committed by
Alexandre Julliard
Apr 11, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LISTVIEW_GetColumnT: care for the format of the string.
LISTVIEW_Create: send HDM_SETUNICODEFORMAT message.
parent
39d013c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
18 deletions
+39
-18
listview.c
dlls/comctl32/listview.c
+39
-18
No files found.
dlls/comctl32/listview.c
View file @
07a308d6
...
...
@@ -253,7 +253,7 @@ static BOOL LISTVIEW_SetItemFocus(HWND, INT);
static
BOOL
LISTVIEW_SetItemPosition
(
HWND
,
INT
,
LONG
,
LONG
);
static
VOID
LISTVIEW_UpdateScroll
(
HWND
);
static
VOID
LISTVIEW_SetSelection
(
HWND
,
INT
);
static
VOID
LISTVIEW_UpdateSize
(
HWND
);
static
BOOL
LISTVIEW_UpdateSize
(
HWND
);
static
BOOL
LISTVIEW_SetSubItemT
(
HWND
,
LPLVITEMW
,
BOOL
);
static
LRESULT
LISTVIEW_SetViewRect
(
HWND
,
LPRECT
);
static
BOOL
LISTVIEW_ToggleSelection
(
HWND
,
INT
);
...
...
@@ -852,7 +852,11 @@ static VOID LISTVIEW_UpdateScroll(HWND hwnd)
scrollInfo
.
nMax
=
nNumOfItems
/
nCountPerColumn
;
if
((
nNumOfItems
%
nCountPerColumn
)
==
0
)
{
scrollInfo
.
nMax
--
;
scrollInfo
.
nMax
--
;
}
else
{
scrollInfo
.
nMax
++
;
}
scrollInfo
.
nPos
=
ListView_GetTopIndex
(
hwnd
)
/
nCountPerColumn
;
scrollInfo
.
nPage
=
nCountPerRow
;
...
...
@@ -7112,7 +7116,10 @@ static LRESULT LISTVIEW_SetColumnT(HWND hwnd, INT nColumn,
}
/* set header item attributes */
bResult
=
Header_SetItemW
(
infoPtr
->
hwndHeader
,
nColumn
,
&
hdi
);
if
(
isW
)
bResult
=
Header_SetItemW
(
infoPtr
->
hwndHeader
,
nColumn
,
&
hdi
);
else
bResult
=
Header_SetItemA
(
infoPtr
->
hwndHeader
,
nColumn
,
&
hdi
);
}
return
bResult
;
...
...
@@ -7547,8 +7554,12 @@ static BOOL LISTVIEW_SetItemCount(HWND hwnd, INT nItems, DWORD dwFlags)
infoPtr
->
hdpaItems
->
nItemCount
=
nItems
;
infoPtr
->
nItemWidth
=
max
(
LISTVIEW_GetItemWidth
(
hwnd
),
DEFAULT_COLUMN_WIDTH
);
LISTVIEW_UpdateSize
(
hwnd
);
LISTVIEW_UpdateScroll
(
hwnd
);
if
(
min
(
precount
,
infoPtr
->
hdpaItems
->
nItemCount
)
<
topvisible
)
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
}
...
...
@@ -8002,6 +8013,9 @@ static LRESULT LISTVIEW_Create(HWND hwnd, LPCREATESTRUCTW lpcs)
0
,
0
,
0
,
0
,
hwnd
,
(
HMENU
)
0
,
lpcs
->
hInstance
,
NULL
);
/* set header unicode format */
SendMessageW
(
infoPtr
->
hwndHeader
,
HDM_SETUNICODEFORMAT
,(
WPARAM
)
TRUE
,(
LPARAM
)
NULL
);
/* set header font */
SendMessageW
(
infoPtr
->
hwndHeader
,
WM_SETFONT
,
(
WPARAM
)
infoPtr
->
hFont
,
(
LPARAM
)
TRUE
);
...
...
@@ -9126,20 +9140,21 @@ static LRESULT LISTVIEW_Size(HWND hwnd, int Width, int Height)
TRACE
(
"(hwnd=%x, width=%d, height=%d)
\n
"
,
hwnd
,
Width
,
Height
);
LISTVIEW_UpdateSize
(
hwnd
);
if
((
uView
==
LVS_SMALLICON
)
||
(
uView
==
LVS_ICON
))
if
(
LISTVIEW_UpdateSize
(
hwnd
))
{
if
(
lStyle
&
LVS_ALIGNLEFT
)
LISTVIEW_AlignLeft
(
hwnd
);
else
LISTVIEW_AlignTop
(
hwnd
);
}
if
((
uView
==
LVS_SMALLICON
)
||
(
uView
==
LVS_ICON
))
{
if
(
lStyle
&
LVS_ALIGNLEFT
)
LISTVIEW_AlignLeft
(
hwnd
);
else
LISTVIEW_AlignTop
(
hwnd
);
}
LISTVIEW_UpdateScroll
(
hwnd
);
LISTVIEW_UpdateScroll
(
hwnd
);
/* invalidate client area + erase background */
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
/* invalidate client area + erase background */
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
}
return
0
;
}
...
...
@@ -9152,18 +9167,21 @@ static LRESULT LISTVIEW_Size(HWND hwnd, int Width, int Height)
* [I] HWND : window handle
*
* RETURN:
* Zero
* Zero if no size change
* 1 of size changed
*/
static
VOID
LISTVIEW_UpdateSize
(
HWND
hwnd
)
static
BOOL
LISTVIEW_UpdateSize
(
HWND
hwnd
)
{
LISTVIEW_INFO
*
infoPtr
=
(
LISTVIEW_INFO
*
)
GetWindowLongW
(
hwnd
,
0
);
LONG
lStyle
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
UINT
uView
=
lStyle
&
LVS_TYPEMASK
;
RECT
rcList
;
RECT
rcOld
;
TRACE
(
"(hwnd=%x)
\n
"
,
hwnd
);
GetClientRect
(
hwnd
,
&
rcList
);
CopyRect
(
&
rcOld
,
&
(
infoPtr
->
rcList
));
infoPtr
->
rcList
.
left
=
0
;
infoPtr
->
rcList
.
right
=
max
(
rcList
.
right
-
rcList
.
left
,
1
);
infoPtr
->
rcList
.
top
=
0
;
...
...
@@ -9192,6 +9210,7 @@ static VOID LISTVIEW_UpdateSize(HWND hwnd)
if
(
!
(
LVS_NOCOLUMNHEADER
&
lStyle
))
infoPtr
->
rcList
.
top
=
max
(
wp
.
cy
,
0
);
}
return
(
EqualRect
(
&
rcOld
,
&
(
infoPtr
->
rcList
)));
}
/***
...
...
@@ -9222,10 +9241,12 @@ static INT LISTVIEW_StyleChanged(HWND hwnd, WPARAM wStyleType,
if
(
uOldView
==
LVS_REPORT
)
ShowWindow
(
infoPtr
->
hwndHeader
,
SW_HIDE
);
if
((
lpss
->
styleOld
&
WS_HSCROLL
)
!=
0
)
if
(((
lpss
->
styleOld
&
WS_HSCROLL
)
!=
0
)
&&
((
lpss
->
styleNew
&
WS_HSCROLL
)
==
0
))
ShowScrollBar
(
hwnd
,
SB_HORZ
,
FALSE
);
if
((
lpss
->
styleOld
&
WS_VSCROLL
)
!=
0
)
if
(((
lpss
->
styleOld
&
WS_VSCROLL
)
!=
0
)
&&
((
lpss
->
styleNew
&
WS_VSCROLL
)
==
0
))
ShowScrollBar
(
hwnd
,
SB_VERT
,
FALSE
);
if
(
uNewView
==
LVS_ICON
)
...
...
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