How to "press" the listbox vertical scrollbar programmatically

Hi all...

I have a CListBox derived class.

When some  condition occures in the CListBox' parent object, I need to simulate the click on the scrollbar. That simulation includes the visual effect of button pression, besides, of course, the actual scroll of the listbox.

I have tried sending WM_SETCURSOR and WM_NCLBUTTONDOWN messages to the listbox but without success.

Any help will be greatly appreciated.

Thanks
Jaime
0
Stuardo (3)
6/9/2004 8:10:01 PM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
328 Views

Similar Articles

[PageSpeed] 56

Reply:

Similar Artilces:

Junk button in windows live accidently pressed
Whenever I open up WLM i press sync automatically as a bad habbit. Because of the loading time, the junk button usually gets inserted before the sync button, pushing it out to the right after its loaded. I therefore accidently press the junk button by accident sometimes. This is a classic Microsoft HCI problem. Surely the button should be there but greyed out when you cant click it. Having buttons moving around in menus is bad in the same way popups are bad. So break your bad habit WLM will sync automatically when 1st opened peter -- If you find a posting or message...

When pressing 'send/receive', I am told object not found. Why?
I have configured email account and the test is positive to my blackberry and to my earthlink account. It won't come to outlook though. Why not? Any error messages? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After furious head scratching, alextrio asked: | I have configured email account and the test is positive to my | blackberry and to my earthlink account. It won't come to outlook | though. ...

How to handle "Enter" key pressed against a cell?
Hi, I am developing an application which uses Excel as the input interface. I want to use a cell as a "button", i.e. the user can use keyboard to navigate to that cell, and press enter to "click" the button. I don't want to use a button clicked by mouse, because that would be slow. However, I can't find any event like "onkeypressed", and "worksheet_change" and "worksheet_selectionchange" doesn't do well. What should I do? Thanks in advance. David Chan Many people would disagree with you about what's easier, but why don'...

Determine keys pressed while clicking
Hello, In my application I need to figure out which modifier keys (ALT, CTRL and SHIFT) are held when the user clicks somewhere. I can easily figure out about the Shift and Ctrl key, since they're sent in the nFlags parameter of OnLButtonDown through MK_SHIFT and MK_CONTROL. But apparently MK_ALT isn't part of that, for some reason. Previously, I tried to grab the keystate with the GetKeyState function, except during beta testing it turned out it doesn't always work for everyone (I never had any problems myself, but some others did). Is there another way to find out which ...

Pressing Tab to move field selection via rows, not columns
Hi, In my form, I have the following setup (free text fields): 1. Part # 1. Qty 1.Notes 2. Part # 2. Qty 2.Notes and this goes on for 8 rows/lines. When selecting 1. Part #, and then pressing TAB, it takes you DOWN instead of across - from what i gather CRM makes you go down each colum before starting at the top of the next one. Is there anyway to make CRM TAB to the right field, and not the below field? Thanks matt Hi Matt, You need to set the tabIndex property of fields to change the tab order. CRM's tabIndex starts from 1000 - implying...

How to figure out if a key is pressed in a cell of a table or a cell of a table lost the focus
I've a table in Microsoft Word (Office 2003) with several rows and columns. Like in Excel I'd like to color the cells according to their values (called conditional formating in Microsoft Excel). If the value is less than zero the cell gets colored red, is it zero the cell gets colored yellow and is it greater than zero the cell gets colored green. My problem with VBA is how to figure out if a cell got edited. In Visual Basic I have events like LostFocus or KeyDown. But I'm missing this events in VBA. Any help is very appreciated. Regards Stefan Look at the last ...

how to handle key press in a dialog box?
i want to forward the key presses from a parent dialog box to a child dialog box for display Sachin Shah wrote: > i want to forward the key presses from a parent dialog box to a child > dialog box for display from the WM_KEYDOWN, use SendMessage() or PostMessage() to DialogBox Window if the DialogBox is not modal. -- Murali Krishna. > i want to forward the key presses from a parent dialog box to a child > dialog box for display Its better to call a method or post/send a custom message and pass the text instead of forwarding everything. For starters, you will have issues whe...

In 2003 office , No response when i press Clt + ;
I used to be able to insert dates this way in other versions of excel but it does not work anymore! Why ? Thanks! perhaps you had pressed the keys "CTRL"+"=" you can try press the keys "Ctrl" + "Shift"+"=" -- ===================================================== * �����ഺ���ٵ�ʱ���и�Ů��ԸΪ��ȥ���� ���� * * ����־�ᶨ�ض���˵����Ҫ���ٲ����ң��Ҿ�ȥ���� * * ���������ʵ���ʱ���и�Ů��Ը���ҹ�����Ȫ������ * * ��ն�������Ķ���˵�����ٲ���Ǯ���Ҿͺ���ͬ���ھ���* * * * �Ž�ƽ ...

Accidentally pressed "Don't Save" in Work
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I was working on a school project and its a very long project and i forgot to save it in-between. I had open a few word documents and wanted to close one, but closed the one i was working on and hit Don't Save button by accident. Is there a way to get my work back? <br> PS. I allready checkt the recovery folder and it didn't contained my file. Hi. Unfortunately, there is not much you can do at this point. You won't find any backup files in the recovery folder, as you told Word that you di...

Outlook Express launches Word when Send button is pressed
After recently having some software issues, and then resolving them, my Outlook Express lauches Word whenever I try to send email. How can I disable this? Why is it happening? replace anonymous with mbschwartz2 for my email. Thank you. ...

Replicate Pressing Shift Button with SendKeys
Is it possible to replicate pressing the SHIFT button with SendKeys? Not by using the plus (+) sign. I need to use it with an AS400 system and the plus sign isn't working. I need to replicate the SHIFT button on the keyboard. I appreciate your help. Thanks Steve Application.SendKeys "+=" assuming + is above the = on your keyboard. Regards, Peter T "Steve" <Steve@discussions.microsoft.com> wrote in message news:1C1822F3-77E4-4FC6-9E50-5712DE79239C@microsoft.com... > Is it possible to replicate pressing the SHIFT button with SendKeys? ...

Is this text from Microsoft press really correct(exam 70-536)
Hi! Here I have some text from Microsoft Press(exam 70-536) It says: "The .NET Framework provides you the ability to both import Win32 functions using Dll import attribute and you can also use P/Invoke to make direct calls against Win32 DLLs." Now when I use P/Invoke I use the DLLImport attribute but what does the book mean in this text when it says "both import Win32 functions using Dll import attribute" but this is how P/Invoke is used and then the text says you can also use P/Invoke to make direct calls against Win32 DLLs. Does anyone understand what t...

How should I set Excel to automative move to the next cell without press "Right Key" when I input one digit in one cell?
Hello, everyone: I hope to input just one charactor in one cell, and when I input it, I hope Excel can automative move to the next cell without press "Right Key", so that I can continue to input the other charactor in the next cell. How can I set Excel to do it? Hi this is not really possible. Though you may check the onkye status with API cals this kind of solution won't be stable (IMHO). Problem is Excel does not execute macros while in Edit mode. >-----Original Message----- >Hello, everyone: > I hope to input just one charactor in one cell, and when I inp...

How do I turn on "pressing enter goes to the next cell" option?
This is going to sound terribly dumb, but I used to be able to press the "enter" key and the next cell in the column would become the active one. Randomly however this ceased to happen. Can anyone please advise as to how I can re-activate this option? <Tools> <Options> <Edit> tab, Check "Move Selection After Enter", And choose direction. -- HTH, RD ===================================================== Please keep all correspondence within the Group, so all may benefit! ===================================================== "Hollywood" &...

Bills loose information when Enter in Register... button is presse
In Money 2007 Premium, when I select a bill and click on the Enter in Register... button, the Account information is missing, even though it shows correctly if I edit the bill series, or an individual occurance. Any ideas? Loan Payment? It's broken. Support told someone we wanted it this way. Go figure. "DaveG" <DaveG@discussions.microsoft.com> wrote in message news:57F3BDB9-3A2D-415A-A299-DF9ADB96E174@microsoft.com... > In Money 2007 Premium, when I select a bill and click on the Enter in > Register... button, the Account information is missing, even though i...

Back to "A" column upon pressing "Enter"
Something happened with Excel at my work and it no longer does this. Now when I press Enter it just goes down one row instead of down one row and back over to the "A" column. Does anyone know how to get it to go down a row and all the way back to the "A" column upon pressing Enter? Hope that makes sense. Thx! If you use the Tab key to move across a row then hit the ENTER key you will go back to start column one row down. Gord Dibben MS Excel MVP On Tue, 03 Jun 2008 08:00:13 -0500, ��������� <none@none.net> wrote: >Something happened with Excel at my work...

Pressing CAPS LOCK show me Activity Panel
Hallo, in Excel, sometimes, when I press CAPS LOCK button on my Logitech keyboard the application show me Activity Panel. Why ? It's very boring Please help me, thanks to all ...

When replying, I press send and get an error message.
When I am replying to an email. I press send and I get an error message that says it could not be sent. object missing. How do i fix thins so I can send messages out of outlook? I would appreciate help! :) -- Trisha ...

Sending e-mail with Lotus Notes pressing an excel button
How can I send a pre-written e-mail with Lotus Notes by pressing command button in Excel -- AndyOn ----------------------------------------------------------------------- AndyOne's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2021 View this thread: http://www.excelforum.com/showthread.php?threadid=37579 ...

Remotely press connect on HQ Client
I am trying to figure out a way that we could drop a worksheet and then press the connect button at a given store without actually having to remote desktop into that store server. I have designed a way to drop worksheets from a web interface but, it would be even better if I could then have the store connect. Your help is greatly appreciated, Dan Would you share a little on how you are creating worksheets from the web interface? "Daniel" <dfelzke@goodwillaz.org> wrote in message news:eGmfMeD6IHA.4352@TK2MSFTNGP03.phx.gbl... >I am trying to figure out a way that we...

pressed icon
In My palette, when user clicks the icon I want it to look like pressed .. When the command associated with the icon is finished or another button is clicked then it should be seen as before (raised ). How may I do it. should I have two kinds of bitmap for one icon and change the icon bitmap accordingly? Thanks lee I am not sure what a palette is for you. CToolbar provides this functionaliy. All you have to do is call SetCheck to change its pressed state. If you are not using a CToolBar, you can do it yourself by drawing the border of an icon in a particular way. It all depends upon what con...

press VK_RETURN or VK_DOWN to change the focus
There are 5 editbox.I want to let user press VK_RETURN(or VK_UP or VK_DOWN) to change the focus on these editbox. Please see the following code,and it don't work. BOOL CDefineTypeDialog::PreTranslateMessage(MSG* pMsg) { if (pMsg->message == WM_KEYDOWN) { if((LOWORD(pMsg->wParam) == VK_DOWN)||(LOWORD(pMsg->wParam) ==VK_RETURN)) { CWnd * SubWnd = GetFocus(); CWnd *NextWnd = GetNextDlgTabItem(SubWnd); if(NextWnd->IsKindOf(RUNTIME_CLASS(CWnd))) { NextWnd->SetFocus(); return TRUE; } } if (pMsg->wParam ==VK_UP) { CWnd* SubWnd = GetFocus...

Capturing Key Presses in CPropertyPage
I've got a Property Sheet with several Property Pages. I want hitting the Escape key to call the OnCancel() function, and I want hitting the Enter key to call the OnOK() function, just like in a normal dialog. I tried capturing the WM_KEYDOWN in the Property Page, but I didn't ever catch anything. This is one of those cases where PreTranslateMessage is appropriate. I'd try that first. joe On 18 Feb 2006 09:21:56 -0800, mr.porteiro.head@gmail.com wrote: >I've got a Property Sheet with several Property Pages. I want hitting >the Escape key to call the OnCancel()...

Pressing "TAB" key doesn't move focus out of Rich edit Control.
Hello Experts! I have designed a MFC activeX control which is a rich edit control derived from CRichEditCtrl class. We are using this control along with other control in VB application. The problem is pressing Tab key in this control does'nt move the focus to other controls instead inserts a tab(4 spaces) in the rich edit control itself. Does anyone has any idea how can I override this default TAB behaviour and force TAB key to move focus out of this control? Thanks, Muskaan ...

how to get notification in the parent dialog about mouse press and release on a button control
Hi all, I am developing a mobile-phone like Call UI . If the user keeps pressing 0 for a while i display + in the editbox otherwise 0. I need to detect for how long the user has pressed 0 button and handle it in parent dialog(i dont want to subclass the button). Thanks & Regards, Shoeb First, you should *NEVER* use as a design criterion "I don't want to subclass the button". That is a very, very bad way to solve problems. I once responded to one of these messages having subclassed six controls before breakfast (literally). Avoiding subclassing of a control...