From ab9e9d9b189dbd4d0b26bf2c6065331689a4e0c7 Mon Sep 17 00:00:00 2001 From: freedom7341 Date: Wed, 11 Oct 2023 14:28:01 -0600 Subject: [PATCH] Progress on #17: we have listview with items, beginning context menu implementation, just need to be able to execute the items and then remove groups and items, as well as give icons to all of the items, we are so close!!! --- progmgr/group.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/progmgr/group.c b/progmgr/group.c index e03907c..5977d8c 100644 --- a/progmgr/group.c +++ b/progmgr/group.c @@ -380,6 +380,10 @@ LRESULT CALLBACK GroupWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa { switch (message) { + HWND hWndListView = NULL; + + // find the listview control + hWndListView = FindWindowEx(hWnd, NULL, WC_LISTVIEW, NULL); case WM_CREATE: { @@ -393,6 +397,17 @@ LRESULT CALLBACK GroupWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa return TRUE; } + case WM_CONTEXTMENU: + { + POINT pt = { NULL, NULL }; + HMENU hMenu = NULL; + BOOL bPopup = NULL; + + pt.x = GET_X_LPARAM(lParam); + pt.y = GET_Y_LPARAM(lParam); + break; + } + case WM_CLOSE: return ShowWindow(hWnd, SW_MINIMIZE); @@ -403,9 +418,6 @@ 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;