?
Solved

Style Problems using Static CSplitters

Posted on 2000-03-26
4
Medium Priority
?
226 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
VinExpert earned 400 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

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…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month14 days, 18 hours left to enroll

770 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