Click here to Skip to main content
15,902,447 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Stuck At Zero4-Sep-08 8:00
Stuck At Zero4-Sep-08 8:00 
AnswerRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Mark Salsbery4-Sep-08 7:59
Mark Salsbery4-Sep-08 7:59 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Stuck At Zero4-Sep-08 8:03
Stuck At Zero4-Sep-08 8:03 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Mark Salsbery4-Sep-08 9:10
Mark Salsbery4-Sep-08 9:10 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Stuck At Zero4-Sep-08 9:32
Stuck At Zero4-Sep-08 9:32 
QuestionRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Mark Salsbery4-Sep-08 9:33
Mark Salsbery4-Sep-08 9:33 
AnswerRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Stuck At Zero4-Sep-08 9:35
Stuck At Zero4-Sep-08 9:35 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Mark Salsbery4-Sep-08 9:53
Mark Salsbery4-Sep-08 9:53 
Ohhh....

Maybe you want the TVN_ITEMCHANGED notification instead of TVN_SELCHANGED
BOOL CViewFilter::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
  if (wParam == IDC_TREE1)
  {
    NMHDR *pHdr = (NMHDR *)lParam;

    if (pHdr->code == TVN_ITEMCHANGED)
    {
      NMTVITEMCHANGE *pNMTVItemChange = (NMTVITEMCHANGE *)lParam;

      if (pNMTVItemChange->hItem)
      {
        if (m_filterTreeCtrl.GetCheck(pNMTreeView->itemNew.hItem))
        {
          // Select All Subsequent Children Nodes
          SetDecendentNodesOn(pNMTVItemChange->hItem);
        }
        else
        {
          // Deselect All Subsequent Children Nodes
          SetDecendentNodesOff(pNMTVItemChange->hItem);
        }
      }

      return TRUE;
    }
  }

  return CDialog::OnNotify(wParam, lParam, pResult);
}


Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Stuck At Zero4-Sep-08 10:03
Stuck At Zero4-Sep-08 10:03 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Mark Salsbery4-Sep-08 10:21
Mark Salsbery4-Sep-08 10:21 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Stuck At Zero4-Sep-08 10:33
Stuck At Zero4-Sep-08 10:33 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Mark Salsbery4-Sep-08 11:12
Mark Salsbery4-Sep-08 11:12 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Stuck At Zero8-Sep-08 5:25
Stuck At Zero8-Sep-08 5:25 
QuestionWhat message does a vertical CScrollBar send when it is moved? Pin
KellyR4-Sep-08 5:17
KellyR4-Sep-08 5:17 
AnswerRe: What message does a vertical CScrollBar send when it is moved? Pin
Mark Salsbery4-Sep-08 5:40
Mark Salsbery4-Sep-08 5:40 
GeneralRe: What message does a vertical CScrollBar send when it is moved? Pin
KellyR4-Sep-08 10:06
KellyR4-Sep-08 10:06 
Questionupdate password Pin
Chandrasekharan P4-Sep-08 5:08
Chandrasekharan P4-Sep-08 5:08 
AnswerRe: update password Pin
Rajesh R Subramanian4-Sep-08 6:10
professionalRajesh R Subramanian4-Sep-08 6:10 
AnswerRe: update password Pin
David Crow4-Sep-08 7:04
David Crow4-Sep-08 7:04 
QuestionUsing strtok() in a UNICODE MFC Application Pin
Andy2024-Sep-08 4:54
Andy2024-Sep-08 4:54 
AnswerRe: Using strtok() in a UNICODE MFC Application Pin
Mark Salsbery4-Sep-08 5:17
Mark Salsbery4-Sep-08 5:17 
GeneralRe: Using strtok() in a UNICODE MFC Application Pin
Andy2024-Sep-08 10:07
Andy2024-Sep-08 10:07 
GeneralRe: Using strtok() in a UNICODE MFC Application Pin
David Crow4-Sep-08 10:53
David Crow4-Sep-08 10:53 
GeneralRe: Using strtok() in a UNICODE MFC Application Pin
Mark Salsbery4-Sep-08 10:56
Mark Salsbery4-Sep-08 10:56 
Questionhow can i remove this error Pin
pc_dev4-Sep-08 4:27
pc_dev4-Sep-08 4:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.