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
fe7d44df
Commit
fe7d44df
authored
Feb 28, 2021
by
Michael Müller
Committed by
Alexandre Julliard
Mar 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aclui: Add icons to the users list.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f57356ad
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
2 deletions
+39
-2
Makefile.in
dlls/aclui/Makefile.in
+1
-1
aclui.rc
dlls/aclui/aclui.rc
+5
-0
aclui_main.c
dlls/aclui/aclui_main.c
+33
-1
user_icons.bmp
dlls/aclui/user_icons.bmp
+0
-0
No files found.
dlls/aclui/Makefile.in
View file @
fe7d44df
MODULE
=
aclui.dll
IMPORTLIB
=
aclui
IMPORTS
=
comctl32 user32 advapi32
IMPORTS
=
comctl32 user32 advapi32
gdi32
EXTRADLLFLAGS
=
-mno-cygwin
-Wb
,--prefer-native
...
...
dlls/aclui/aclui.rc
View file @
fe7d44df
...
...
@@ -40,3 +40,8 @@ BEGIN
| WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP,
5, 115, 230, 95, WS_EX_NOPARENTNOTIFY | WS_EX_CLIENTEDGE
END
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
/* @makedep: user_icons.bmp */
IDB_USER_ICONS BITMAP user_icons.bmp
dlls/aclui/aclui_main.c
View file @
fe7d44df
...
...
@@ -55,6 +55,7 @@ struct security_page
unsigned
int
user_count
;
HWND
dialog
;
HIMAGELIST
image_list
;
};
static
HINSTANCE
aclui_instance
;
...
...
@@ -110,11 +111,12 @@ static void add_user(struct security_page *page, PSID sid)
user
->
name
=
name
;
user
->
sid
=
sid
;
item
.
mask
=
LVIF_PARAM
|
LVIF_TEXT
;
item
.
mask
=
LVIF_PARAM
|
LVIF_TEXT
|
LVIF_IMAGE
;
item
.
iItem
=
-
1
;
item
.
iSubItem
=
0
;
item
.
pszText
=
name
;
item
.
lParam
=
(
LPARAM
)
user
;
item
.
iImage
=
(
sid_type
==
SidTypeGroup
||
sid_type
==
SidTypeWellKnownGroup
)
?
0
:
1
;
SendMessageW
(
GetDlgItem
(
page
->
dialog
,
IDC_USERS
),
LVM_INSERTITEMW
,
0
,
(
LPARAM
)
&
item
);
}
...
...
@@ -160,6 +162,30 @@ static void init_users(struct security_page *page)
}
}
static
HIMAGELIST
create_image_list
(
UINT
resource
,
UINT
width
,
UINT
height
,
UINT
count
,
COLORREF
mask_color
)
{
HIMAGELIST
image_list
;
HBITMAP
image
;
INT
ret
;
if
(
!
(
image_list
=
ImageList_Create
(
width
,
height
,
ILC_COLOR32
|
ILC_MASK
,
0
,
count
)))
return
NULL
;
if
(
!
(
image
=
LoadBitmapW
(
aclui_instance
,
MAKEINTRESOURCEW
(
resource
))))
{
ImageList_Destroy
(
image_list
);
return
NULL
;
}
ret
=
ImageList_AddMasked
(
image_list
,
image
,
mask_color
);
DeleteObject
(
image
);
if
(
ret
==
-
1
)
{
ImageList_Destroy
(
image_list
);
return
NULL
;
}
return
image_list
;
}
static
void
security_page_free
(
struct
security_page
*
page
)
{
unsigned
int
i
;
...
...
@@ -169,6 +195,8 @@ static void security_page_free(struct security_page *page)
free
(
page
->
users
);
LocalFree
(
page
->
sd
);
if
(
page
->
image_list
)
ImageList_Destroy
(
page
->
image_list
);
if
(
page
->
security
)
ISecurityInformation_Release
(
page
->
security
);
free
(
page
);
...
...
@@ -199,6 +227,10 @@ static void security_page_init_dlg(HWND hwnd, struct security_page *page)
column
.
cx
=
rect
.
right
-
rect
.
left
;
SendMessageW
(
control
,
LVM_INSERTCOLUMNW
,
0
,
(
LPARAM
)
&
column
);
if
(
!
(
page
->
image_list
=
create_image_list
(
IDB_USER_ICONS
,
18
,
18
,
2
,
RGB
(
255
,
0
,
255
))))
return
;
SendMessageW
(
control
,
LVM_SETIMAGELIST
,
LVSIL_SMALL
,
(
LPARAM
)
page
->
image_list
);
init_users
(
page
);
if
(
page
->
user_count
)
...
...
dlls/aclui/user_icons.bmp
0 → 100644
View file @
fe7d44df
2.67 KB
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