Click here to Skip to main content
15,901,284 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
SuggestionRe: NM_RDBLCLK not working for CTreeCtrl Pin
Jochen Arndt14-Mar-18 22:44
professionalJochen Arndt14-Mar-18 22:44 
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
_Flaviu14-Mar-18 23:16
_Flaviu14-Mar-18 23:16 
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
Jochen Arndt14-Mar-18 23:24
professionalJochen Arndt14-Mar-18 23:24 
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
_Flaviu14-Mar-18 23:37
_Flaviu14-Mar-18 23:37 
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
Jochen Arndt15-Mar-18 0:43
professionalJochen Arndt15-Mar-18 0:43 
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
_Flaviu15-Mar-18 1:16
_Flaviu15-Mar-18 1:16 
AnswerRe: NM_RDBLCLK not working for CTreeCtrl Pin
Victor Nijegorodov15-Mar-18 3:04
Victor Nijegorodov15-Mar-18 3:04 
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
_Flaviu16-Mar-18 0:57
_Flaviu16-Mar-18 0:57 
I have tried double-click too, not working:
C++
ON_NOTIFY(NM_RDBLCLK, IDC_TREE1, &CTestTreeView::OnNMRDblclkTree1)
ON_NOTIFY(NM_DBLCLK, IDC_TREE1, &CTestTreeView::OnNMDblclkTree1)


C++
void CTestTreeView::OnNMRDblclkTree1(NMHDR *pNMHDR, LRESULT *pResult)
{
	// TODO: Add your control notification handler code here

	MessageBox(_T("Right dbl-click"));

	*pResult = 0;
}

void CTestTreeView::OnNMDblclkTree1(NMHDR *pNMHDR, LRESULT *pResult)
{
	// TODO: Add your control notification handler code here

	MessageBox(_T("Left dbl-click"));

	*pResult = 0;
}

I modified the control style, as follow:
C++
void CTestTreeView::OnInitialUpdate()
{
	CFormView::OnInitialUpdate();
	GetParentFrame()->RecalcLayout();

	m_Tree.ModifyStyle(0, CS_DBLCLKS);

	ResizeParentToFit();
}

where m_Tree is my CTreeCtrl object.
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
Victor Nijegorodov16-Mar-18 3:18
Victor Nijegorodov16-Mar-18 3:18 
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
_Flaviu19-Mar-18 0:26
_Flaviu19-Mar-18 0:26 
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
Victor Nijegorodov20-Mar-18 9:23
Victor Nijegorodov20-Mar-18 9:23 
QuestionSingle View with Multiple Tabs in MFC Pin
Sampath57912-Mar-18 22:51
Sampath57912-Mar-18 22:51 
QuestionRe: TabbedPane vs TabView Pin
Richard MacCutchan12-Mar-18 22:59
mveRichard MacCutchan12-Mar-18 22:59 
AnswerRe: TabbedPane vs TabView Pin
Sampath57912-Mar-18 23:04
Sampath57912-Mar-18 23:04 
GeneralRe: TabbedPane vs TabView Pin
Richard MacCutchan12-Mar-18 23:15
mveRichard MacCutchan12-Mar-18 23:15 
GeneralRe: TabbedPane vs TabView Pin
Sampath57912-Mar-18 23:17
Sampath57912-Mar-18 23:17 
GeneralRe: TabbedPane vs TabView Pin
Richard MacCutchan12-Mar-18 23:32
mveRichard MacCutchan12-Mar-18 23:32 
GeneralRe: TabbedPane vs TabView Pin
Sampath57912-Mar-18 23:44
Sampath57912-Mar-18 23:44 
GeneralRe: TabbedPane vs TabView Pin
Richard MacCutchan12-Mar-18 23:53
mveRichard MacCutchan12-Mar-18 23:53 
GeneralRe: TabbedPane vs TabView Pin
Sampath57912-Mar-18 23:59
Sampath57912-Mar-18 23:59 
GeneralRe: TabbedPane vs TabView Pin
Victor Nijegorodov13-Mar-18 1:25
Victor Nijegorodov13-Mar-18 1:25 
GeneralRe: TabbedPane vs TabView Pin
Sampath57913-Mar-18 6:14
Sampath57913-Mar-18 6:14 
GeneralRe: TabbedPane vs TabView Pin
Victor Nijegorodov13-Mar-18 9:29
Victor Nijegorodov13-Mar-18 9:29 
GeneralRe: TabbedPane vs TabView Pin
Sampath57913-Mar-18 17:59
Sampath57913-Mar-18 17:59 
GeneralRe: TabbedPane vs TabView Pin
Sampath57913-Mar-18 19:05
Sampath57913-Mar-18 19:05 

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.