Solved

Style Problems using Static CSplitters

Posted on 2000-03-26
4
204 Views
Last Modified: 2013-11-20
I have changed my applications from a dialoged based app to a windows explorer style app.  I have four seperate classes within each seperate pane of splitter windows. They are a CTreeView, ClistView(2), and a CListBox.  How can I change the styles of the treeview and listview at runtime.  The classes are created dynamically and I really dont have a clue what I am doing when it comes to MFC.  I also have several other problems that have arisen, so if you want more points and would like to help with the rest let me know.  Thank you.
0
Comment
Question by:boodabelly
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
VinExpert earned 100 total points
ID: 2659475
Hi,

Have U used ModifyStyle(...)?, For example, If U want to switch the list control property from the Icon view to Report view, then

UrListControlPointer->ModifyStyle(LVS_ICON, LVS_REPORT, 0);
will do that, similarly for others too...

Tryt it out.

VinExpert
0
 
LVL 3

Expert Comment

by:_mb_
ID: 2683257
The following lines show, how you can access to the views and their controls within the splitter panes.
m_wndSplitter is my (example) CSplitter-object. Write the name of your member variable instead.

CMainFrame     *mf     = (CMainFrame *)AfxGetMainWnd(); //the container of the splitter window (could be another window)
CTreeView     *wndTree = (CTreeView *)mf->m_wndSplitter.GetPane(<row>,<col>);
CListView     *wndList = (CListView *)mf->m_wndSplitter.GetPane(<row>,<col>);
CTreeCtrl     *pTree  = wndTree->GetTreeCtrl();
CListCtrl     *pList  = wndList->GetListCtrl();

Now your can use ModifyStyle() or ModifyStyleEx(), see the previous comment.
0
 
LVL 1

Author Comment

by:boodabelly
ID: 2687316
Im just letting you guys know that I have read the comments, but I have not had time to try this out.  This project has been put on the back burner and I have to finish this after I finish the new project.  Thank you for your help and I will keep you updated.
0
 
LVL 1

Author Comment

by:boodabelly
ID: 2781721
Yeah thats was the problem, I just changed something else being stupid that was affecting the way everything was supposed to work
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question