CTreeCtrl SortChildren centers the selection, moves scrollbar

I've encountered a situation where calling SortChildren (or SortChildrenCB)
centers the scrollbar of my CTreeView pane for the selected item (even if
the scrollbar was all the way to the left)

I can't find anything in the knowledge base on microsofts site about this at
all.

Anyone have any ideas?

Thanks
-Cindy


0
cleander1 (1)
1/11/2006 9:13:25 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
745 Views

Similar Articles

[PageSpeed] 40

If I was to guess at what you are trying to say, seems like that your
Horizontal Scrollbar gets centered when you sort your treectrl.  That's
because the selected item at the time of SortChildren call is larger than
the width of the window.
I think there is only one way to get around this (correct me if I am wrong).
Set the selection to an item you know will fit the width of the tree before
you call SortChildren

If you can get the TreeCtrl to scroll Horizontally let me know. I want to
know how! :)

AliR.

"Cindy" <cleander@wausaufs.com> wrote in message
news:eWCPhPvFGHA.644@TK2MSFTNGP09.phx.gbl...
> I've encountered a situation where calling SortChildren (or
SortChildrenCB)
> centers the scrollbar of my CTreeView pane for the selected item (even if
> the scrollbar was all the way to the left)
>
> I can't find anything in the knowledge base on microsofts site about this
at
> all.
>
> Anyone have any ideas?
>
> Thanks
> -Cindy
>
>


0
AliR3470 (3235)
1/11/2006 11:02:55 PM
Reply:

Similar Artilces:

selection in CTreeCtrl
Hello, I have a Tree Control in my application that displays two types of items: type A and type B. I want to implement the following: 1. When user clicks on any item of type A it should be shown as selected and the previously selected item will be deselected - it is actually the default behavior. 2. When user clicks on any item of type B - nothing should happen: the previously selected item remain selected and the clicked item remains deselected. So, actually, I want that the items of type B will never highlighted with a blue band. How can do it? Thanks, Mark. -- Please ...

Bolding or Hilighting node in a CTreeCtrl
I am looking for a way of of bolding, hilighting, or changing the text color for one specific node in a CTreeCtrl. Is this possible? If so, how? You have use an owner draw tree control. Look in here for one: http://www.codeproject.com/treectrl/#Custom+Tree+Controls This one looks useful http://www.codeproject.com/treectrl/colortreectrl.asp AliR. <mr.porteiro.head@gmail.com> wrote in message news:1141668031.681508.117640@u72g2000cwu.googlegroups.com... > I am looking for a way of of bolding, hilighting, or changing the text > color for one specific node in a CTreeCtrl. Is t...

Need to import select Access data into Excel using two variables
I have a large amount of data in Access, more than Excel can manage. The data consists of many columns; has Col_1 as unique key 1,2,3,4,5,6,7,8 etc… and contains data that includes Col_2, Col_3, Col_4 etc…. It takes a combination of Col_2 and Col_3 to get the data I want. Col_2 has duplicate values and Col_3 makes the subset unique. One more thing… Col_3, Col_4 etc…may have blanks throughout the table and can’t be changed. I don’t own it. I want to be able to open Excel, type “Number from Col_2” into Col_A , “(Number fromCol_3) or (blank)”into Col_B and have the Col_4, Col_5 etc… d...

moving data #6
How do I have data in one worksheet show up in another worksheet? "warrior26" <warrior26@discussions.microsoft.com> wrote in message news:41AE8583-C155-462E-AFFD-A38B699CEE5C@microsoft.com... > How do I have data in one worksheet show up in another worksheet? Suppose you have data in A1 of Sheet1. On the other worksheet where you want this to show, put the formula =Sheet1!A1 "Stephen" wrote: > "warrior26" <warrior26@discussions.microsoft.com> wrote in message > news:41AE8583-C155-462E-AFFD-A38B699CEE5C@microsoft.com... > > Ho...

SELECT Issue
I'm having trouble with a select statement and wondering if some experts could help:) I have a VARCHAR field in a table called IDFormula which contains an INT PRIMARY KEY value from a column in the same table(with brackets around it). For example if the table was called Unit, and one of the primary key values was 341, then somewhere in the IDFormula column there may be a [341] in it as such: [341]+1. I need to select any row from the table which has a primary key that can be found in an IDFormula column. I hope this is clear. Here is some example code I threw together. DECLAR...

Media Center Wont Record Items on the Recording Shedule
I have marked "Record the Series" on several TV Programs and the red dot is showing were ever it is required to accord with this schedule. Yet it does not record I am running Windows 7 32 bit and the copy I am using is a week old rebuild making a new copy When I look at the guide whilst the program is playing live it has the message "This program will be recorded" It should be recording now but isnt and it does not start. So far I have carried out the following checks 1.Recording is set to go to the D Drive where there are two relevant folders included in...

How do you "move" normalemail.dotm (default template)
I'm the support person for our local facility. The remote network guys recently pushed an upgrade to our location for Office 2007. Getting help from them is very difficult. Some of my coworkers use "Quick Parts" to insert text into emails. Unfortunately, when they try to create entries they get an error that normalemail.dotm is read only. The next time they start up Outlook, the text for the quick gallery is empty. After a little research I found out that Outlook is trying to save the changes to the network copy of NormalEmail.DOTM instead of the local mac...

How do I center the publication on the website?
When I preview the website, it is showing as being published on the left side in the preview. I would like to center the entire publication on the web. Also, I would like to add a shaded background around the entire publication on the web view (not in the pub), much like how it looks in the view where we build the pub. Thanks for your help. -- zack This is w/Pub 2003... thanks. -- zack "zack" wrote: > When I preview the website, it is showing as being published on the left side > in the preview. I would like to center the entire publication on the web. > ...

Re: Cannot select names from global list thru OWA
"msnews.microsoft.com" <MAC@HOTMAIL.COM> wrote in message news:... >I have exchange 2003 with outlook 2003 as client. > > Whenever I use OWA and try to create new email and click on TO to select > receiver's name from the global list, I get a differnent screen which as > me to enter name to search. I want to display names so I can select from > the list. > > Here is the screen that I get each time I click on TO. I should be seeing > everyone's name so I can select. > > If I connect locally, I do get the list and there is no proble...

mailbox move #4
Hello, Installed Exch2003 into our existing site (5.5) and have started moving mailboxes. Have moved approx. 30 with no issues, but I moved a user and she now has a mailbox in both servers (2003 & 5.5). She is receiving internal emails no problem but external emails are going to her 5.5 mailbox which she doesn't access. Any help would be appreciataed. Try to run the move mailbox wizard against her mailbox again and see if that clears this problem up. That used to fix some problems like this in Exchange 5.5, but I have not seen it in 2003. -- Jim McBee - MostlyExchange Blog: ...

Protecting Selected Cells and Functions
I have a worksheet. In Cell B2 is a Data validation box Listing a range of colleagues names( DRop Down Menu). On selection of a name in B2, the contents of the whole worksheet changes. I like to Protect the worksheet for: 1) Hiding the formulaes 2) And most importantly preventing editing of the contents of any other cell (except B2). and yet be permiitted to: 3) Select contents in Cell B2 (Data Validation Box) 4) Select Auto filters in Row 4 I've tried using the the Tools/ Protect worksheet menu, ticking Select Lock Cells, Select Unlock cell, use auto filters. And in in Format/Cells/...

how to select customers from a table
I have a table that multiple users will use at the same time. It basically consists of a list of customers names. I want to be able to select multiple customers from that table when I am creating a new "project" so when I print out the project report, the "customers" list on the report is the customers that were selected from that table. How can I do that without locking the table from other users? -- Message posted via http://www.accessmonster.com On Fri, 10 Aug 2007 23:22:45 GMT, "kallen via AccessMonster.com" <u6724@uwe> wrote: >I have a table ...

CTreeCtrl EditLabel
Ok here is the problem. I have created an owner drawn tree (CCheckTree). Each node in the tree has a check box beside it. I have derived (CEditableCheckTree) from (CCheckTree). CEditableCheckTree has the edit labels style. When I call the EditLabel function the edit control shows up but when I left click in the edit control the caret isn't placed in the control, I can't select the text, or type into the control. I can right click and paste into the control, but that is just about all. Also if I call the edit control's SetFocus function it never receives focus. I know that I'm o...

Outlook2007 Can't select text
This has occurred several times. I cannot select text or place the cursor anywhere on page when composing or replying. If I close Outlook and restart it that seems to solve the problem. I gather this is a known issue in the Beta. Does anyone know of a fix? There are some known issues related to responsiveness in the editor that = should go away in later versions.=20 --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, a...

How to move CRM 3.0 Data from one SQL server to another
We have been piloting CRM 3.0 on a set of test servers and would like to move the data (accounts, contacts, cases, lists, etc.) from the pilot database to the production CRM 3.0 database we just built. Tried a DTS copy and a backup/restore both of which failed miserably. We really would like to keep the data that has been stored in the pilot database as the basis of our production copy. Does anyone have any suggestions on how to do this (if it's possible)? Thanks. a few options 1 - write migraiton code 2 - use scribe migrate from www.scribesoft.com simply transferring the databa...

Public Folders and Moving Items
When I drag a mail item between different Public Folders, it copies the item instead of moving the item. If you select MOVE TO FOLDER, it will move it correctly. Is there a way to use drag and drop for moving items? Thanks. ...

CTreeCtrl
I have a CTreeCtrl with a couple of leafs and each leaf has a checkbox associated with it. If the user checks the checkbox of a leaf, how do I determine which leaf was checked? What callback can be used to get the check state of a leaf? NMCLICK msg works but I do not know how to get the current leaf that was clicked on. Does anybody know? Scott O' http://www.it-faq.pl/mskb/261/289.HTM Regards, Victor "ScottyO" <ofriels@abc.com> wrote in message news:ulAhetDREHA.3140@TK2MSFTNGP11.phx.gbl... > I have a CTreeCtrl with a couple of leafs and each leaf has a checkbo...

Select Distinct subquery in a Report Control?
I've written a report that aggregates (avg, sum, count) a 10 or 15 measures ($, Days to Book, # rejects, %within SLA, etc.) I need to do a COUNT DISTINCT on one control (D&B number) to determine how many distinct companies I am dealing with in a particular country or region. I've written a SQL subquery that does what I want it to do, but I can't figure out how to imbed that statement into a control expression in a Report. I prefer to work with the report engine because I need to take a number of cuts on different groups and levels of detail and just find it ea...

Outlook 2003 strips off attachments when email moved to deleted folder
Outlook 2003 (Vista machine) strips off the attachment when I delete an email...sometimes I need to retrieve the deleted email...is there a way to stop it from deleting the attachment? I can't find anyway to make it stop. Thanks, Rob Rob J <jacobs360@gscwireless.net> wrote: > Outlook 2003 (Vista machine) strips off the attachment when I delete > an email...sometimes I need to retrieve the deleted email...is there > a way to stop it from deleting the attachment? I can't find anyway > to make it stop. Outlook doesn't do that. Deleting a message moves the...

moving mailboxes from 5.5 to 2003 #3
I can't move a mailbox from 5.5 server to a 2003 server and I think the issues is that the msExchUserAccountControl attribue is not being set properly. RUS seems to be having issues and generates errors when I try to to a rebuild. Any ideas on how to fix RUS or what permissions it requires? ...

Word hangs in Trust Center Settings
Hi, I am using Word 2007 and when I click Trust Center Settings for configuration Word stops responding. I tried starting in safe mode but you cannot access the Trust settings at all in safe mode. Please can someone help. Many thanks. Have you tried deleting the Data key in the registry (with Word closed)? For more on this, see http://word.mvps.org/FAQs/AppErrors/MissingMenusEtc.htm. (Note that for Word 2007, the version number is 12.0.) -- Stefan Blom Microsoft Word MVP "Deejay" <Deejay@discussions.microsoft.com> wrote in message news:15F8BC53...

How to select a boolean from a XpathNavigator
Hi. I have ax xpath expression which returns a true or false. I don't know which method to use from the XPathNavigator object to get the result. There's not a ".SelectValue("xpath expression") method. Typically, I may use ..Select or .SelectSingleNode but I'm not returning a node or set of nodes? Maybe I shouldn't be using a XPathNavigator? Please let me know if you have any ideas. Thanks! -- Steve Hi Steve, Use the XpathNavigator.Evaluate("XpathExpression") method. It will return an Object variable, that you can convert to Boolean usin...

Moving data between Excel sheets
"I have an excel spreadsheet that has 2 sheets, one has a list of open issues" and one a list of "closed issues". One of the fields on the "open issues" sheet has a "closed date" field. Whenever a date is typed into this field, I would like for it to be moved to the "closed issues" sheet, to avoid duplicate, manual entries being done. Can anyone help me with the best way to achieve this? Can this be achieved by using Macro's. Any help with this, would be greatly appreciated. Thanks! Suggest you send this to the programming newsgroup...

Select max of?
I have: tab1: field1 (int), field2 (char) tab2 field1(int), field2 (date), field3 (char) SELECT tab1.field2, MAX(tab2.field2), [???] FROM tab1 INNER JOIN tab2 ON tab2.field1 = tab1.field1 My question is: how can I get the tab2.field3 corresponding the MAX(tab2.filed2)? I mean from the same record. Therefore from this tab2 I want "myText2" ----------------------------------- 1 | 2010-01-01 | myText1 | ----------------------------------- 2 | 2010-02-01 | myText2 | ----------------------------------- 3 | 2010-01-15 | myText3 | --------...

media center
hi. in need of help.i've installed sp1 on windows vista. since doing so i cant access windows media center. every time i try it says: windows cannot open media center, it has been prevented by a software restriction policy contact your system administrator. have also installed a few other programs but have uninstalled all( i think) ------------------------------------- Jake ##-----------------------------------------------## Delivered via http://www.talkcomputer.com/ PC Building Community Web and RSS access to your favorite newsgroup - microsoft.public.window...