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
76518c08
Commit
76518c08
authored
Jul 21, 2008
by
Owen Rudge
Committed by
Alexandre Julliard
Jul 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
appwiz.cpl: Add imagelist for listview.
parent
2812a9ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
appwiz.c
dlls/appwiz.cpl/appwiz.c
+39
-0
No files found.
dlls/appwiz.cpl/appwiz.c
View file @
76518c08
...
...
@@ -115,6 +115,30 @@ static BOOL AddListViewColumns(HWND hWnd)
}
/******************************************************************************
* Name : AddListViewImageList
* Description: Creates an ImageList for the list view control.
* Parameters : hWnd - Handle of the list view control.
* Returns : Handle of the image list.
*/
static
HIMAGELIST
AddListViewImageList
(
HWND
hWnd
)
{
HIMAGELIST
hSmall
;
HICON
hDefaultIcon
;
hSmall
=
ImageList_Create
(
GetSystemMetrics
(
SM_CXSMICON
),
GetSystemMetrics
(
SM_CYSMICON
),
ILC_MASK
,
1
,
1
);
/* Add default icon to image list */
hDefaultIcon
=
LoadIconW
(
hInst
,
MAKEINTRESOURCEW
(
ICO_MAIN
));
ImageList_AddIcon
(
hSmall
,
hDefaultIcon
);
DestroyIcon
(
hDefaultIcon
);
(
void
)
ListView_SetImageList
(
hWnd
,
hSmall
,
LVSIL_SMALL
);
return
hSmall
;
}
/******************************************************************************
* Name : ResetApplicationList
* Description: Empties the app list, if need be, and recreates it.
* Parameters : bFirstRun - TRUE if this is the first time this is run, FALSE otherwise
...
...
@@ -134,6 +158,13 @@ static HIMAGELIST ResetApplicationList(BOOL bFirstRun, HWND hWnd, HIMAGELIST hIm
if
(
!
AddListViewColumns
(
hWndListView
))
return
NULL
;
}
else
/* we need to remove the existing things first */
{
ImageList_Destroy
(
hImageList
);
}
/* now create the image list and add the applications to the listview */
hImageList
=
AddListViewImageList
(
hWndListView
);
return
(
hImageList
);
}
...
...
@@ -156,7 +187,15 @@ static BOOL CALLBACK MainDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar
case
WM_INITDIALOG
:
hImageList
=
ResetApplicationList
(
TRUE
,
hWnd
,
hImageList
);
if
(
!
hImageList
)
return
FALSE
;
return
TRUE
;
case
WM_DESTROY
:
ImageList_Destroy
(
hImageList
);
return
0
;
}
return
FALSE
;
...
...
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