February 14th, 2003, 08:11 AM
MFC Tree Control: How to add checkboxes to a tree control?
Q: How to add checkboxes to a tree control?
- At design time, use the resource editor to enable the "Check boxes" style.
- At run-time, add the 'TVS_CHECKBOXES' style to the tree control, after you have created it and before you have populated it.
DWORD dwLong = m_tree.GetWindowLong(GWL_EXSTYLE);
dwLong |= TVS_CHECKBOXES;
Last edited by Andreas Masur; July 25th, 2005 at 03:55 PM.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!