Thread: Controlling an edit control

  1. #1
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685

    Controlling an edit control

    First off, I'm using the win32 api. Now here is the problem, I want to have a multiline edit box control another multiline edit box when a its vertical scroll bar is moved. I know that edit boxes don't send a message to the parents WM_VSCROLL. I only get the edit controls EN_VSCROLL message from the WM_COMMAND message when a scroll bar's arrows are pressed or when a you move the scrollbar by not using its thumb. Any suggestions?

  2. #2
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    You could try trapping the EN_VSCROLL for the first edit box and sending an EM_LINESCROLL or EM_SCROLL message to the second edit box.
    zen

  3. #3
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    ...and when you're processing the EN_VSCROLL, make sure that it came from the first edit box only, otherwise sending the EM_SCROLL to the second edit box will trigger it also (which will probably end up posting repeated EN_VSCROLL messages until your second edit box can scroll no more).
    zen

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How can I send a text string to an edit control
    By marc74 in forum Windows Programming
    Replies: 5
    Last Post: 01-06-2005, 10:14 PM
  2. Appending text to an edit control
    By dit6a9 in forum Windows Programming
    Replies: 3
    Last Post: 08-13-2004, 09:52 PM
  3. Restricting input to an edit control
    By bennyandthejets in forum Windows Programming
    Replies: 7
    Last Post: 10-05-2003, 01:10 AM
  4. endless edit control
    By ZerOrDie in forum Windows Programming
    Replies: 3
    Last Post: 03-21-2003, 02:51 AM
  5. Keeping focus on an edit control ...
    By Unregistered in forum Windows Programming
    Replies: 3
    Last Post: 02-19-2002, 02:12 AM