Click here to Skip to main content
15,895,606 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
JokeRe: Context menu on non clicnt area Pin
Iain Clarke, Warrior Programmer31-Mar-09 22:27
Iain Clarke, Warrior Programmer31-Mar-09 22:27 
GeneralRe: Context menu on non clicnt area Pin
CPallini31-Mar-09 23:40
mveCPallini31-Mar-09 23:40 
Questionhow to EXPAND or COLLAPSE a CTreeCtrl item?(TVS_SINGLEEXPAND cannot) Pin
kaviniswell31-Mar-09 21:02
kaviniswell31-Mar-09 21:02 
AnswerRe: how to EXPAND or COLLAPSE a CTreeCtrl item?(TVS_SINGLEEXPAND cannot) Pin
Stuart Dootson31-Mar-09 22:03
professionalStuart Dootson31-Mar-09 22:03 
GeneralRe: how to EXPAND or COLLAPSE a CTreeCtrl item?(TVS_SINGLEEXPAND cannot) Pin
kaviniswell31-Mar-09 22:14
kaviniswell31-Mar-09 22:14 
GeneralRe: how to EXPAND or COLLAPSE a CTreeCtrl item?(TVS_SINGLEEXPAND cannot) Pin
Stuart Dootson31-Mar-09 22:23
professionalStuart Dootson31-Mar-09 22:23 
GeneralRe: how to EXPAND or COLLAPSE a CTreeCtrl item?(TVS_SINGLEEXPAND cannot) Pin
kaviniswell31-Mar-09 22:41
kaviniswell31-Mar-09 22:41 
GeneralRe: how to EXPAND or COLLAPSE a CTreeCtrl item?(TVS_SINGLEEXPAND cannot) Pin
Iain Clarke, Warrior Programmer31-Mar-09 22:26
Iain Clarke, Warrior Programmer31-Mar-09 22:26 
As you've found out, using a static BOOL is a terrible idea. You've found the fatal flaw for yourself.

You can use this to find its current state:
BOOL bExpanded = m_treeCtrl.GetItemState (hItem, TVIS_EXPANDED) == TVIS_EXPANDED;


To check the, erm, expanded state of the given item.

But why are you doing this yourself? This is something the tree can do perfectly well for itself. Just tick the has buttons style, and away you go.

I hope that helps,

Iain.

In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!

GeneralRe: how to EXPAND or COLLAPSE a CTreeCtrl item?(TVS_SINGLEEXPAND cannot) Pin
kaviniswell31-Mar-09 22:40
kaviniswell31-Mar-09 22:40 
GeneralRe: how to EXPAND or COLLAPSE a CTreeCtrl item?(TVS_SINGLEEXPAND cannot) Pin
kaviniswell31-Mar-09 23:08
kaviniswell31-Mar-09 23:08 
Questionp2p binary header in msnp15 Pin
amit090231-Mar-09 20:59
amit090231-Mar-09 20:59 
QuestionMenu bar not display Pin
zakkas248331-Mar-09 19:57
zakkas248331-Mar-09 19:57 
AnswerRe: Menu bar not display Pin
Iain Clarke, Warrior Programmer31-Mar-09 22:32
Iain Clarke, Warrior Programmer31-Mar-09 22:32 
QuestionPropertySheet Pin
john563231-Mar-09 17:51
john563231-Mar-09 17:51 
AnswerRe: PropertySheet Pin
Mahesh Kulkarni31-Mar-09 20:10
Mahesh Kulkarni31-Mar-09 20:10 
AnswerRe: PropertySheet Pin
Mahesh Kulkarni31-Mar-09 20:14
Mahesh Kulkarni31-Mar-09 20:14 
Questionthe date time picker control Pin
alphaxz31-Mar-09 15:50
alphaxz31-Mar-09 15:50 
AnswerRe: the date time picker control Pin
Chandrasekharan P31-Mar-09 18:22
Chandrasekharan P31-Mar-09 18:22 
GeneralRe: the date time picker control [modified] Pin
alphaxz31-Mar-09 19:42
alphaxz31-Mar-09 19:42 
GeneralRe: the date time picker control Pin
Chandrasekharan P31-Mar-09 19:46
Chandrasekharan P31-Mar-09 19:46 
AnswerRe: the date time picker control Pin
aks.31-Mar-09 21:22
aks.31-Mar-09 21:22 
QuestionTerminateProcess() Pin
gamefreak229131-Mar-09 12:56
gamefreak229131-Mar-09 12:56 
AnswerRe: TerminateProcess() Pin
Joe Woodbury31-Mar-09 13:04
professionalJoe Woodbury31-Mar-09 13:04 
GeneralRe: TerminateProcess() Pin
gamefreak229131-Mar-09 13:12
gamefreak229131-Mar-09 13:12 
GeneralRe: TerminateProcess() Pin
Joe Woodbury31-Mar-09 13:38
professionalJoe Woodbury31-Mar-09 13:38 

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.