Solved

Style Problems using Static CSplitters

Posted on 2000-03-26
4
192 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
Comment Utility
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_
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Pressing cancel button with C# UI Automation 3 40
countEvens challenge 2 56
sum28 challenge 31 95
haveThree challenge 22 100
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now