Day to day work issues we find with windows, mac, unix and internet, software apps etc. we get many many questions and find out some weird things tips and tricks about windows OS that might help others, some of these will help others and help our clients setup software to there requirements.
Thursday, 5 February 2015
CTreeCtrl SetCheck not working OnInitDialog() init fix C++
For example:-
HTREEITEM hItem = m_treeCtrl.InsertItem("test");
m_treeCtrl.SetCheck(hItem,TRUE);
doesn't check the checkboxes!
but if you unmodify and re-modify then it works fine:-
m_treeCtrl.ModifyStyle(TVS_CHECKBOXES, 0);
m_treeCtrl.ModifyStyle(0, TVS_CHECKBOXES);
HTREEITEM hItem = m_treeCtrl.InsertItem("test");
m_treeCtrl.SetCheck(hItem,TRUE);
Monday, 2 February 2015
How to fix the RC -nologo compiler error in Visual studio 2012/2013
open View -> Other Windows -> Property Manager
or View -> Property Manager
expand the Debug or Release.
double click on Microsoft.Cpp.Win32.user
go to VC++ Directories
rows which have been changed are bold. on all bold rows, click inside the text field, then on the Dropdown menu select inherit from parent or Project Defaults
do same for all include, libs etc.
save and re-compile. problem solved and solves it for any other projects too.
Subscribe to:
Posts (Atom)