Skip to content

Commit

Permalink
* ChannelView: Allow single click to select channel (#39)
Browse files Browse the repository at this point in the history
Closes #39 as completed.
  • Loading branch information
iProgramMC committed May 12, 2024
1 parent e701778 commit 1ec320e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/windows/ChannelView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ ChannelView* ChannelView::Create(HWND hwnd, LPRECT rect)
0,
WC_TREEVIEW,
TEXT("Tree View"),
WS_VISIBLE | WS_CHILD | WS_BORDER | TVS_HASLINES | TVS_HASBUTTONS,
WS_VISIBLE | WS_CHILD | WS_BORDER | TVS_HASLINES | TVS_HASBUTTONS | TVS_TRACKSELECT,
rect->left,
rect->top,
rect->right - rect->left,
Expand Down Expand Up @@ -317,9 +317,11 @@ void ChannelView::OnNotify(WPARAM wParam, LPARAM lParam)

switch (nmhdr->code)
{
case NM_DBLCLK:
case TVN_SELCHANGED:
{
HTREEITEM hSelectedItem = TreeView_GetSelection(m_hwnd);
NMTREEVIEW* nmtv = (NMTREEVIEW*) lParam;

HTREEITEM hSelectedItem = nmtv->itemNew.hItem;
if (!hSelectedItem) break;

TCHAR buffer[128];
Expand Down

0 comments on commit 1ec320e

Please sign in to comment.