listviewery?
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
#include "registry.h"
|
#include "registry.h"
|
||||||
// #define WIN32_LEAN_AND_MEAN
|
// #define WIN32_LEAN_AND_MEAN
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
#include <CommCtrl.h>
|
||||||
#include <strsafe.h>
|
#include <strsafe.h>
|
||||||
|
|
||||||
/* Variables */
|
/* Variables */
|
||||||
@@ -117,13 +118,25 @@ PGROUPWND CreateGroupWindow(PGROUP pgGroup)
|
|||||||
mcs.style = WS_VISIBLE;
|
mcs.style = WS_VISIBLE;
|
||||||
mcs.lParam = (LPARAM)pgGroup;
|
mcs.lParam = (LPARAM)pgGroup;
|
||||||
|
|
||||||
if (!(gw.hWndGroup = (HWND)SendMessage(hWndMDIClient, WM_MDICREATE, 0, (LPARAM)(LPTSTR)&mcs)))
|
if ((gw.hWndGroup = (HWND)SendMessage(hWndMDIClient, WM_MDICREATE, 0, (LPARAM)(LPTSTR)&mcs)) == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
// Create the group window ListView control
|
||||||
|
if ((gw.hWndListView = CreateWindowEx(WS_EX_LEFT, WC_LISTVIEW, L"ListView",
|
||||||
|
WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN
|
||||||
|
| LVS_ICON | ((LVS_AUTOARRANGE & bAutoArrange) * LVS_AUTOARRANGE) | LVS_NOSORTHEADER,
|
||||||
|
gw.grp.rcGroup.left, gw.grp.rcGroup.top,
|
||||||
|
gw.grp.rcGroup.right - gw.grp.rcGroup.left, gw.grp.rcGroup.bottom - gw.grp.rcGroup.top,
|
||||||
|
gw.hWndGroup, NULL, hAppInstance,
|
||||||
|
NULL)) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
// Load the group icon
|
// Load the group icon
|
||||||
ExtractIconEx(gw.grp.szIconPath, gw.grp.iIconIndex, &hIconBig, &hIconSmall, 0);
|
if (ExtractIconEx(gw.grp.szIconPath, gw.grp.iIconIndex, &hIconBig, &hIconSmall, 1))
|
||||||
|
{
|
||||||
SendMessage(gw.hWndGroup, WM_SETICON, ICON_SMALL, (LPARAM)hIconSmall);
|
SendMessage(gw.hWndGroup, WM_SETICON, ICON_SMALL, (LPARAM)hIconSmall);
|
||||||
SendMessage(gw.hWndGroup, WM_SETICON, ICON_BIG, (LPARAM)hIconBig);
|
SendMessage(gw.hWndGroup, WM_SETICON, ICON_BIG, (LPARAM)hIconBig);
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: make sure the groups delete their icons upon destruction!
|
// TODO: make sure the groups delete their icons upon destruction!
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user