CTreeCtrl and full row selection

Hello.
I'm using CTreeCtrl in my MDI application (something like the CTReeCtrl of
Windows Explorer).
Currently, a user may select an item only if he hovers over the item text
and presses the mouse L Button.
I want that an item in the tree will be selected when the user presses the
mouse L Button anywhere inside the row, and not only on the text.
I tried adding a FullRowSelection style to the tree, but in that case all
the row is highlighted and it looks very bad, I want that only the item text
will be highlighted.
In Windows Explorer it works fine somehow: When you press on any location
inside the tree control the item that is found on the row, is selected and
only the item text is highlighted.
Using Spy++ I tried to set the style of my TreeControl to the same style of
Microsoft Explorer Tree Control, but it did not work for me.

I'd appreciate any help,
Thanks,
Janiv Ratson.


0
janiv (189)
8/3/2005 7:44:53 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
368 Views

Similar Articles

[PageSpeed] 54

I believe you'll have to handle LButtonDown messages yourself in cases where the click doesn't 
select a row.  You'll need to look at the coordinates of the click, and determine which row to 
select.

"Janiv Ratson" <janiv@aoe6.net> wrote in message news:uJzgNd$lFHA.4000@TK2MSFTNGP12.phx.gbl...
> Hello.
> I'm using CTreeCtrl in my MDI application (something like the CTReeCtrl of
> Windows Explorer).
> Currently, a user may select an item only if he hovers over the item text
> and presses the mouse L Button.
> I want that an item in the tree will be selected when the user presses the
> mouse L Button anywhere inside the row, and not only on the text.
> I tried adding a FullRowSelection style to the tree, but in that case all
> the row is highlighted and it looks very bad, I want that only the item text
> will be highlighted.
> In Windows Explorer it works fine somehow: When you press on any location
> inside the tree control the item that is found on the row, is selected and
> only the item text is highlighted.
> Using Spy++ I tried to set the style of my TreeControl to the same style of
> Microsoft Explorer Tree Control, but it did not work for me.
>
> I'd appreciate any help,
> Thanks,
> Janiv Ratson.
>
> 


0
ScotB (233)
8/3/2005 7:53:49 AM
Reply:

Similar Artilces:

Row & Column headers
We just had Excel 2000 installed on one of our PC screens at work, and although the row and column headers look OK at first, when you click on a cell the respective column and row header, instead of just turning bold, turns italic, bold and strikethrough (yeah, go figure) as well! Is something corrupted or has this been set up specifically, and if so how can I change it? I have tried the font options but they just say "Normal". Indeed, the font *is* normal until you click on that row/column. Steve Wylie Have a look at the defined styles in your default workbook. My own ...

Full path in MRU Recent File List
Hello! I have a Visual Studio .NET application and I have a list of most recently used files under the menu item File. What makes me unhappy is that only truncated path (e.g. D:\Projects\...\file.ext) is shown, which makes the list quite useless. IS THERE ANY WAY HOW TO DISPLAY FULL PATH IN THE LIST OF MOST RECENTLY USED FILES? Thank you for any help. Jiri Napalm wrote: > Hello! > I have a Visual Studio .NET application and I have a list of most > recently used files under the menu item File. What makes me unhappy is > that only truncated path (e.g. D:\Projects\...\file.ext) is ...

FRx Web should be able to print selected unit an its children only
Instead of only being able to print the selcted unit, or entire tree ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx?mid=0c578f81-8bdb-4322-b55f-942299eb0f78&dg=microsoft.pu...

money 2007 full
is the full version of money 2007 deluxe out yet or is it just a trial version. Yes you can buy the full version from online retailers like Amazon or the MS site or you can go to the usual retailers; however if you want to try it you can also download a trial. -- Regards Bob Peel, Microsoft MVP - Money For UK tips & fixes see http://support.microsoft.com/default.aspx?scid=fh;EN-GB;mny. I do not respond to any emails that I have not specifically asked for. "freeway29" <freeway29@discussions.microsoft.com> wrote in message news:28BCAD0E-6E4A-42BE-B812-F150455AE5E9@m...

Hide row
Is there a workshhet change code i can use to hide a row if the 5 row below have complete data in sat a,b and c so at any time there is only 5 rows visable and when another row i completed the row at the top gets hidde -- Message posted from http://www.ExcelForum.com Hi, Play with this code. I think it's close: Jeff Sub HideRow() Dim more, foundValues As Boolean Dim cRow, LastRow As Long LastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row more = True cRow = 2 While more foundValues = False f = 0 For j = 1 To 5 For k = 1 To 3 If Range(Cells(cR...

Create two rows based on one row
A worksheet has information in a single row. The new worksheet has columns. How can I create two rows per column in this new worksheet, based on information from the single row (key=document number, same amount for debit- and credit - but in a different row, accounts based on table) . Hi not really sure about your spreadsheet layout. Could you post an example (plain text - no attachment please) and describe your expected result based on this example -- Regards Frank Kabel Frankfurt, Germany Toni wrote: > A worksheet has information in a single row. The new worksheet has > columns. ...

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 ...

Lost messages due to mailbox full
I just migrated users to a new server. I brought over there old mailboxes, but did not check the size. Three of our users exceeded the 200MB default limit and did not receive their mail, until I uped the limit. Are these messages lost or do they go to another location where they can be recovered? I have been searching the docs and knowledge base, but have not yet found an answer. Any help will be greatly appreciated. -- Thanks, Steve Since the messages cannot be delivered they should be dropped by exchange. You might check the badmail folder to see if they might have got dropped in t...

Why is hyperlink staying imbedded when I insert rows into Excel?
I keep constant notes on my Excel spreadsheet daily and have to insert rows from time to time. However, any typed hyperlinks seem to stay imbedded even though I have inserted rows to where the typed portion is moved. Please let me know what I can do to prevent this. Thank you. ...

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 ...

full mailbox permission
Hello all Exchange 2007 sp2. If I grant a user full mailbox access to another mailbox, can that user who was granted full mailbox access send emails as that user? is the "send as right" included when full mailbox access have been granted? sawyer <occompguy@cox.net> wrote: > Hello all > > Exchange 2007 sp2. If I grant a user full mailbox access to another > mailbox, can that user who was granted full mailbox access send > emails as that user? is the "send as right" included when full > mailbox access have been granted? No, it'...

Too many rows highlighted
When I click on a row, multiple rows are automatically selected. This happens to all of my sheets in my workbook. Do I have a bug? How do I fix this? Hi, You could try tapping F8. if that doesn't work and you have E2007 then there is a reported bug that causes this and if you alter the zoom level up and down again it should clear the problem -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "RLD" wrote: > When I click on a row, ...

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...

mailbox full
Just got windows 7 and set up my work email at home, my boss is trying to email me but it is saying to her that my mailbox is full when its barely got any emails in it, can I alter the capacity somehow? any help gratefully received, thanks The Inbox on your account's SERVER is full, not on your PC. I assume this is a POP3 account. If so, change your settings to either delete from the server after downloading, or to delete after so many days. Tools - Accounts - youraccount - Properties - Advanced uncheck [ ] Leave a copy of messages on server But first, you should log into...

format row top of screen
I have a spreadsheet with many lines and want to have row 2 remain on the screen when I scroll down. I have completely forgotton how to do this. Please help. Select C1, menu Window>Freeze Panes -- HTH RP (remove nothere from the email address if mailing direct) "Pmcm" <Pmcm@discussions.microsoft.com> wrote in message news:07EB5F86-BAE3-4E86-BDFB-418605D23052@microsoft.com... > I have a spreadsheet with many lines and want to have row 2 remain on the > screen when I scroll down. I have completely forgotton how to do this. Please > help. ...

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...

Print a full-size booklet from Word 2003.
How do I print a booklet with pages that are 8.5x11 on paper that is 11x17? I want a full-size bi-fold for a report booklet but keep getting pages that are half the expected size. In order to accomplish this, you have to set the paper size to 11x17. This requires that you have the driver installed (and selected) for a printer that is capable of printing that size. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "waterwings" <waterwings@discussions.microsoft.com> wrote in message news:C660F69E-D47B-457...

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...

What should do if need to do full erase and install
May have to do a full erase and install of HD -- not an archive and install, but a full erase and reinstall of Office because of crazy OS permission issues having. So, want to ask: I use Entourage, Excel, and Word. What should I keep in mind before doing this? I know with archive and install, everything will get imported beautifully, but with erase and install, and then reinstalled office manually with cd -- what is the smoothest way to make sure all accounts in Entourage, and everything in Word/Excel -- will come back ok. Thanks Kevs OS 10.4.1 Office 2004 Here are the suggestions fo...

Inserting Rows???
Dear All Is it possible to write vb code to insert a row below say D12 i there's data in D12? and again if there's data in D13, insert a row an so on... so that I will have an empty row in between all the rows wit data... Would really appreciate any suggestion/feedback... Cheers kelvi -- Message posted from http://www.ExcelForum.com hce wrote.. > Dear All > > Is it possible to write vb code to insert a row below say D12 if > there's data in D12? and again if there's data in D13, insert a row and > so on... so that I will have an empty row in between all the ...

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...

missing rows
I'm sure there is a simple solution to this, but so far it has eluded me. A client's spreadsheed has recently gone a bit weird. The row numbers on the affected worksheets have turned blue, and many rows are missing. I figured out the missing rows have been resized to nothing, but it's a time consuming job to set them back to normal size, as there are dozens or more. Surely there is a more efficient way to resize them all in one hit? I tried selecting them all and resizing with Format/Row/Auto and Format/Row/Height (12.75) but to no avail. I was informed that they had the Bugbea...

The $ thing to lock cells at rows or columns
Hi group, I do know how manually modify the content of a cell so that when "pulling it" to autocomplete into further rows and columns one can lock either row or column. Like =$I$10 It is rather cumbersome though getting the $ sign where it must be. Once I knew a combination of keys that fixed that for me, but I have forgotten. And if one is optimistic enough to enter the $ sign in the help search function one is in for a reminder of who made this software. So I have to ask you guys and girls. Is there still a clever way to have the =$I$10, or has that been discarded with the ba...

need to input alternate blank rows in spreadsheet
Need to input alternate blank rows into imported spreadsheet. Currently has 24000 lines of data and would like to find a way of not having to manually input these blank rows! help! Also if this is possible will I be able to format row height at the same time? Hi, In a blank column, insert numbers from 1 to 24,000 I.e. if data is from A2:F24001, then in G2:G24001, enter 1 to 24000. Now copy G2:G24001 and paste in G24002. Thereafter you can sort the numbers in column G in ascending order. This will insert one blank row after each row. -- Regards, Ashish Mathur Mic...