Skip to content

Commit

Permalink
cheaper listview resize
Browse files Browse the repository at this point in the history
  • Loading branch information
freedom7341 committed Oct 20, 2024
1 parent f6b7c29 commit 2c1fa58
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions progmgr/group.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,10 +572,6 @@ UINT CalculateGroupMemory(_In_ PGROUP pGroup, _In_ UINT cItems, _In_ BOOL bLean)
\* * * */
LRESULT CALLBACK GroupWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND hWndListView = NULL;

// find the listview control
hWndListView = FindWindowEx(hWnd, NULL, WC_LISTVIEW, NULL);

switch (message)
{
Expand Down Expand Up @@ -612,6 +608,12 @@ LRESULT CALLBACK GroupWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
case WM_NOTIFY:
{
LPNMHDR lpnmhdr = (LPNMHDR)lParam;
HWND hWndListView = NULL;

// find the listview control
hWndListView = FindWindowEx(hWnd, NULL, WC_LISTVIEW, NULL);
if (hWndListView == NULL)
break;

switch (lpnmhdr->code)
{
Expand Down Expand Up @@ -652,6 +654,9 @@ LRESULT CALLBACK GroupWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa

// get the group window rect
GetClientRect(hWnd, &rcGroupWindow);

// find the listview control
hWndListView = FindWindowEx(hWnd, NULL, WC_LISTVIEW, NULL);
if (hWndListView == NULL)
break;

Expand Down

0 comments on commit 2c1fa58

Please sign in to comment.