Solved

Style Problems using Static CSplitters

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
if loop in java 3 130
NotAlone Challenge 20 80
sumHeights2  challenge 7 88
Way to decrease size of apk file 9 45
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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

867 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

12 Experts available now in Live!

Get 1:1 Help Now