I'm pretty new to this and I don't really understand an easy way to get the different classes in my MFC app talking to each other. Right now I am very confused as to how to get my App class to interact with my view class and such. My immediate question is, I'm using UpdateAllViews() to get my CTreeView to populate itself but each time it is called, any expanded nodes are collapsed. Is there any way to stop it from doing that?
If anyone just feels like typing or are bored I have a better question for you. How do I make everything talk to each other? Let me set it up. I have a basic MFC generated Windows Explorer type program giving me 1) an App class 2) a MainFrm 3) a Doc 4) a Splitter 5) a CTreeView and 6) a CListView. I have to get a lot of information in the background when the program starts. As new information becomes available I need to add that group of nodes to the TreeView. Right now I start a new thread in my App class after everything is visible. I used extern to give my MainFrm class access to my App class. It uses a Timer to periodically check the App variables and uses the following statement to add get the TreeView to update itself:
Is there a better way to communicate between these things. It seems like an awful bad way to do it. Please let me know if you have any suggestions or would like to see source.