Mercurial > dwindows
comparison win/dw.c @ 341:503d1ac958bb
Call TreeView_SelectItem() instead of dw_tree_item_select() so we get the
selection event.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 11 Apr 2003 10:44:59 +0000 |
parents | 4482dd0bb87d |
children | bab5cd8dd93f |
comparison
equal
deleted
inserted
replaced
340:eff674cb4935 | 341:503d1ac958bb |
---|---|
1509 else if(tem->hdr.code == NM_RCLICK && tmp->message == NM_RCLICK) | 1509 else if(tem->hdr.code == NM_RCLICK && tmp->message == NM_RCLICK) |
1510 { | 1510 { |
1511 if(tmp->window == tem->hdr.hwndFrom) | 1511 if(tmp->window == tem->hdr.hwndFrom) |
1512 { | 1512 { |
1513 int (*containercontextfunc)(HWND, char *, int, int, void *, void *) = tmp->signalfunction; | 1513 int (*containercontextfunc)(HWND, char *, int, int, void *, void *) = tmp->signalfunction; |
1514 HTREEITEM hti; | 1514 HTREEITEM hti, last; |
1515 TVITEM tvi; | 1515 TVITEM tvi; |
1516 TVHITTESTINFO thi; | 1516 TVHITTESTINFO thi; |
1517 void **ptrs = NULL; | 1517 void **ptrs = NULL; |
1518 LONG x, y; | 1518 LONG x, y; |
1519 | 1519 |
1522 thi.pt.x = x; | 1522 thi.pt.x = x; |
1523 thi.pt.y = y; | 1523 thi.pt.y = y; |
1524 | 1524 |
1525 MapWindowPoints(HWND_DESKTOP, tmp->window, &thi.pt, 1); | 1525 MapWindowPoints(HWND_DESKTOP, tmp->window, &thi.pt, 1); |
1526 | 1526 |
1527 last = TreeView_GetSelection(tmp->window); | |
1527 hti = TreeView_HitTest(tmp->window, &thi); | 1528 hti = TreeView_HitTest(tmp->window, &thi); |
1528 | 1529 |
1529 if(hti) | 1530 if(hti) |
1530 { | 1531 { |
1531 tvi.mask = TVIF_HANDLE; | 1532 tvi.mask = TVIF_HANDLE; |
1532 tvi.hItem = hti; | 1533 tvi.hItem = hti; |
1533 | 1534 |
1534 TreeView_GetItem(tmp->window, &tvi); | 1535 TreeView_GetItem(tmp->window, &tvi); |
1535 dw_tree_item_select(tmp->window, hti); | 1536 TreeView_SelectItem(tmp->window, hti); |
1536 | 1537 |
1537 ptrs = (void **)tvi.lParam; | 1538 ptrs = (void **)tvi.lParam; |
1538 | |
1539 } | 1539 } |
1540 containercontextfunc(tmp->window, ptrs ? (char *)ptrs[0] : NULL, x, y, tmp->data, ptrs ? ptrs[1] : NULL); | 1540 containercontextfunc(tmp->window, ptrs ? (char *)ptrs[0] : NULL, x, y, tmp->data, ptrs ? ptrs[1] : NULL); |
1541 tmp = NULL; | 1541 tmp = NULL; |
1542 } | 1542 } |
1543 } | 1543 } |
2708 */ | 2708 */ |
2709 pOldProc = bubble->pOldProc; | 2709 pOldProc = bubble->pOldProc; |
2710 | 2710 |
2711 switch(msg) | 2711 switch(msg) |
2712 { | 2712 { |
2713 case WM_CTLCOLORSTATIC: | |
2714 case WM_CTLCOLORLISTBOX: | |
2715 case WM_CTLCOLORBTN: | |
2716 case WM_CTLCOLOREDIT: | |
2717 case WM_CTLCOLORMSGBOX: | |
2718 case WM_CTLCOLORSCROLLBAR: | |
2719 case WM_CTLCOLORDLG: | |
2720 _wndproc(hwnd, msg, mp1, mp2); | |
2721 break; | |
2713 case WM_SETFOCUS: | 2722 case WM_SETFOCUS: |
2714 _wndproc(hwnd, msg, mp1, mp2); | 2723 _wndproc(hwnd, msg, mp1, mp2); |
2715 break; | 2724 break; |
2716 case WM_LBUTTONUP: | 2725 case WM_LBUTTONUP: |
2717 { | 2726 { |