Owner draw CListCtrl, EnsureVisible, PreTranslateMessage

There is Owner draw CListCtrl with overriden DrawItem. This class has 
subitems arbitrary controls (CEdit, CButton...). It should be fine to detect 
arrows keys in controls to jump with caret in CEdit boxes in one column by 
pressed arrow key. I tried to catch it in CEdit -> PreTranslateMessage() in 
block if(pMsg->wParam == VK_UP) 
then to call EnsureVisible() to parent CListCtrl to be caret always visible 
and CListCtrl scrolls if needed. Problem is when first time it scrolls up, 
some infinite loop begins and CPU 100% . It seems that something wrong with 
this... Can be EnsureVisible() sent from PreTranslateMessage() of subcontrol 
?   
Or any tip how to catch keystroke and safely to call EnsureVisible() of 
parent CListCtrl ? Or some better solution ? 

Thx,
Peter
0
Peter2031 (452)
3/5/2007 10:46:24 PM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
1100 Views

Similar Articles

[PageSpeed] 38

Reply:

Similar Artilces:

Engineering Drawing
I would like to see a check box in the item Engineering Screen to indicate that the current Drawing Group and revision be attached to a PO line for the item during PO creation (and this attachment will NOT change if the current revision/drawings changes). An additional field in the PO line detail would show the attached drawing group, and allow for this to be changed for the item if required (such as an engineering purchase of a new rev, or a purchase of an old rev). The drawing group should be available in the Purchase Receipt detail, the Incoming Quality Module and other related s...

eraser function in word drawing mode
How do I edit a picture in word (eg: to erase part of the picture)? Is there a eraser function? if so how do I use it?? Hi, Click on the picture and the Picture toolbar should appear. You can turn the toolbar on manually using View > Toolbars > Picture. On the bottom row of the toolbar you'll find selection tools. Use an appropriate selection tool to select an area then use Edit > Cut to remove the selected part. -Jim Quoting from "lawengin" <skho@iinet.net.au>, in article 659b9c2c-f361-4f64-be3c-1e1fb2be6ce3@e32g2000prn.googlegroups.com, on [DATE: > How...

owner of databases
All, Currently, the database owner is set to the person (to the person’s login id - sql login or windows login) who creates the database. In almost all the cases, it is the DBA that creates the databases in our setup. So when “exec sp_help” is executed it lists all the databases on the server along with their owner. As a BEST PRACTICE, who should this owner be set to. The problem with leaving it on the individual users is that when the person quits and if his login is removed the owner shows up as NULL when sp_help is executed. Can it be set to “sa”? Thanks, rgn Ye...

PropertyPage and control drawing problem...
Hi I have a Property Sheet where I have three property pages. On the third property page I have a CListCtrl and several dynamically created Combo Boxes on the top of it (on the top of list control). If the third page is activated and then I change the control to another program (alt + tab) and then back --> I can't see any of those controls in my property page. If I click list control, I can see the row I just clicked but not all. How and when I should draw those controls again TIA -HS ...

CListCtrl report view invisible columns
Hi gurus! :) Is there an elegant and rather easy way of doing the following: My list (report view) has a number of columns. Each column represents a different information about an item. Sometimes, all the items lack of some information - and therefore, one of the columns will stay empty. In these cases, I don't want to display the column - with no information in it. For example, if my columns are "Name", "Hair color", "IQ" Then I would like to see the following: Name | Hair | IQ | | Color| | ________________________| (all information...

Changing Account owner also changes contact owner (and activity owner)
Hi, When I change the owner of an account, CRM also changes the owner of the contacts within that account and changes the owner of the activities that are connected to the contact. Is this behavior by default? (I can't Imagine). Sanne This is the default behavior. This is a nice feature when you lose an employee and need to reassign that employees accounts and all their sub-records to a replacement. Have you tried sharing the account record in question? What is your goal by reassigning the account but not the other related records? - Scott www.easiintl.com Sanne wrote: > Hi, >...

CListCtrl derived class and disabling item selection
Hello everybody. I have a CListCtrl derived class wich is also owner draw. Now I need to disable selecting items. So user should be able to see the list and be able to scroll it and everything. But selecting items should be disabled. I wrote a handle for OnLButtonDown which give me an opportunity to handle mouse button clicking and so user can't select the item by mouse. But it is still possible by arrows. I tried to handle VKeyToItem but it aseems never get called. So in my case how can I disable selecting items by arrows also. Or is there any better way to do that all together? PS...

Disableing items in CLIstCtrl
Hello, Is there a way to disable an item in CListCtrl so that the item is gray out and a user won't be able to select it. Thank You! At this point I think you have to go to an owner-draw list control and do it yourself. You also have to prevent the selection from happening. joe On Fri, 15 Apr 2005 11:03:17 -0400, "Ririko Horvath" <horvathr@securemethods.com> wrote: >Hello, > > Is there a way to disable an item in CListCtrl so that the item is gray >out and a user won't be able to select it. > >Thank You! > Joseph M. Newcomer [MVP]...

Owner's Manager JScript
I'd like to display Owner's Manager on the Sales Order. Everytime, either the form loads OR owner changes, I'd like to display the manager for that owner. Anyone can help me OR point in a right direction OR provide some sample code, that would be great. Thanks, VJ ...

Change owner of Contact to Account's owner
I need to update >3600 contacts so that the contact owner is the same as the account owner and then make sure it stays updated. Any ideas on how to make sure this happens? you need to write code.. 1 - write a tool that will read your contacts and set the owner to be the same as the account owner. This could be done in an unsupported fashion using SQL or in a supported fashion using the SDK 2 - assuming each contact created is linked to an account you could write a callout that reassigns each contact to the accounts owner some coding required ============================== John O&...

CListCtrl OnVScroll never called
I have a CEdit field above the "active" field in a CListCrl, and I need a repaint of the listctrl if a user has dragged the vertical scrollbar. (when I drag the scrollbar the edit - field echoes it self over the hole page). When the mouse releases I thougt I could catch the SB_ENDSCROLL in OnVScroll() or a WM_LBUTTONUP message, but none of these events appears. Any hints to me? -- Laurs Laursen ...

Re-assign owner
I need to re-assign ownership that involves many records (activities etc) and have done this using settings/ users before for infrequent users. However when running the re-assign for users that own many activities etc the system seems to hang. Is there a limit to re-assigning or should I just be very patient and run this outside work hours? thanks On Dec 26, 10:05=A0pm, Steve <St...@discussions.microsoft.com> wrote: > I need to re-assign ownership that involves many records (activities etc) = and > have done this using settings/ users before for infrequent users. However > ...

Using automation to remove items from a drawing
I have a group enclosed in a shape - the "enclosing" shapes part of the group. I want to take the group and ungroup them. After ungrouping I want to select the "enclosing" shape and delete it or move it or whatever.. Is there any way to use automation to select this enclosing shape? That is, any way besides iteratively moving and checking that I am "inisde" the shape? Thanks There are several ways to handle this, depending on what you want to do. 1) Before a shape is ungrouped you can cache the list of its contained shapes. such as: Public Sub UngroupSelect...

How can I draw a box and whisker diagram?
Jon Peltier has instructions for box and whisker charts: http://www.peltiertech.com/Excel/Charts/ComboCharts.html#BoxWhisker Statts wrote: -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html ...

all account owners changed to same owner
CRM 1.2; server OS w2003, sql server 2000 Some time between Wednesday (16th) afternoon and Thursday (17th) afternoon, when it was first noticed, all accounts (30,000+) had the owner changed. Owners A, B and C each owned about 1/3 of the accounts, now all accounts are owned by owner C. This changed was made without changing the last modifiedon date. We are in the process of restoring from backup. We are at a loss as to how this happened. Has anyone had a similar experience? Thoughts anyone? Thanks, -- Jim Yeah Jim, Somebody or some (workflow or other) process changed them! Field...

Owner Draw controls....
Newbie here. Just warning you :-) Using VC 6... I've been trying to place an owner drawn combo box in a dialog, following instructions from a text. I created a derived class for my control. Since I want all the message map functions, I've placed the combo box on the dialog, and used its ID in the owner draw code. The text suggests using a "variable or pointer". I've tried adding a variable with the class wizard, and nothing happens. i.e., the control that I've placed is unaffected. Of course I attached a control variable of my derived class to the combobo...

how do I resize a drawing and all shapes in it?
I'm working with Visio for the first time. Now that I've finished my first drawing, I need to add another drawing of equal size to the same page. However, I made the first drawing so big that there is not enough room on the page to add another drawing of equal size. I would like to reduce the size of the drawing (and all shapes within it, of course) by about one-third. I have searched through all the menu options and there seems to be no way to do this. I tried copying the drawing and pasting it onto another page, hoping that the paste operation would allow a resize, but th...

CDialog doesn't draw itself
Hi I don't understand this. I created a Dialog App with one Button(IDC_GETIMAGE) for testing reasons. When you click on the button the following function is called: void CTest1Dlg::OnGetimage() { CDC* pDC = GetDC(); Print(pDC, PRF_CHILDREN | PRF_CLIENT | PRF_ERASEBKGND | PRF_NONCLIENT | PRF_OWNED); ReleaseDC(pDC); } This works perfect: the dialog "renders" itself into itself (for testing reasons). This means that the CDialog class supports the WM_PRINT message Then I created another Dialog App (title="Test2") with no controls on it. I compiled it, started it and ...

CListCtrl icon view text labels
The icon text labels seem to default to the item's first column text. Is there a way to make this default something other than column 0? I know I can use SetItemText when switching from report to icon view to update the labels, however, this is a royal pain to perform for every item. On Mon, 21 Jul 2003 13:19:43 -0700, Terence Wilson <tez@_REMOVE_THIS_latte.com> wrote in <ohiohvgouevma8riddqcb0742a6s1r8ij1@4ax.com>: >The icon text labels seem to default to the item's first column text. >Is there a way to make this default something other than column 0? Not without ...

Draw fixed length line in detail section
My report has a report header approx 1.5" tall, a page header approx 0.5" tall, followed by the detail section. How can I print a fixed height detail section with verticle lines even if there are only a few records? Essentially, trying to replicate a paper form. The line starts at the bottom of the page header and continues to the top of page footer. In a post a couple days ago, Allen Browne recommended the below for drawing a line down the entire page.....this close, and I am trying to figure out a similar approach for the detail section. Private Sub Report_Page() Me....

Account reassigned owner affects all child entities' owners
Please help, I am out of wits from some of these issues... When an Account is reassigned to a new owner, all child entities' owners automatically becomes the new owner. A number of my customers' business process is such that an Account can be owned by User A, but Cases under the Account can be created by other users within the same BU. I think this makes sense. But the problem with MSCRM is when User A, by reason of change of organisation or maybe resigning from the company, reassigns an Account under his/her charge to User B, all Cases and other child objects under this Accou...

CListCtrl DeleteItem: First row is gone, but second row doesn't scroll up?
Hi, I've got a few list controls and rows are frequently inserted and deleted. However, sometimes, I notice that the first row is gone and unselectable and the second row didn't scroll up. Manually scrolling down and back up 'fixes' it. Why does this happen? Do I call certain methods in the wrong order? >I've got a few list controls and rows are frequently inserted and deleted. >However, sometimes, I notice that the first row is gone and unselectable >and the second row didn't scroll up. >Manually scrolling down and back up 'fixes' it. >Why do...

Change Owner Of A Phone Call Activity With On Save Event
Hi all, I would like to change the owner of a new phone call activity once the save button has been pressed. Ideally, I would like this to be one of the support Q's I have created as e-mails willl be sent from the owner back to the caller and we do not want them coming from our receptionist. I have written the folliwng code and put it in the OnSave section for the phone call entity but it is incomplete as I am not sure what to assign to the ownerid to change it to a Q? The owner type is owner as per the documentation? Is this a strin, int etc.? Can someone please assist? Cheers, Mark /*...

Owner/Organiser
When I have an activity (say appointment) and I assign it to somebody else, everything is as expected. However, if the organiser is changed to another person first and then the owner is being changed, then after assigning the appointment to that other person makes CRM pop-up another assign-screen. If you press Cancel on this screen the owner is already changed. My question is, when does the Assign(To) screen pop-up twice, only if the organiser is changed on forehand? ...

Log Owner changes of CRM entities
When the owner of a record changes, it's ownership history should be tracked. This would allow visibility and reporting flexibility as well as open the door as an enabler of historical reporting. ie: Order totals by Sales Rep could then be calculated by the Sales Rep who owned the Account at the time of the order, and not just by the current owner of the Account. Options considered: 1. Record the owner change date and previous owner on the record itself using custom code from the onchange event. 2. Create a generic Ownership change log entity where a record is created from the Owne...