Click here to Skip to main content
15,897,518 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
HTREEITEM htree = m_tree.GetSelectedItem();
BOOL save, status, reason, reasoncbo, reasoncmt;
int qp,pq;

if (htree)
{}
i am getting htree as null when i select something from combobox
Posted
Comments
Richard MacCutchan 29-Jun-15 9:57am    
If there is no tree control item selected at the time then that is correct. You should capture the treeitem when it gets selected.

1 solution

From the documentation: "CTreeCtrl::GetSelectedItem"[^], it looks you are trying to retrieve the selected item of a TreeCtrl (instead of a ComboBox), and such operation is failing.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900