Solved

Style Problems using Static CSplitters

Posted on 2000-03-26
4
208 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
repeatEnd java challenge 42 85
Complete beginner needs help making a cron job 9 125
only14 challenge 19 81
Not needed 13 119
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 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