• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 188
  • Last Modified:

Changing Max and Min of a scroll bar from another program

How can i change the max and min property of a Horizontal or Vertical scroll bar of a program with another program?

example: like using SendMessage API to send keystrokes to another program.
0
NinJa
Asked:
NinJa
  • 4
1 Solution
 
nietodCommented:
Use SMB_SETRANGE message.
0
 
nietodCommented:
You can also use the SMB_SETSCROLLINFO and SMB_GETSCROLLINFO messages.  These allow you te get/set more options than just the ends of the range.  

Note these messages (including SMB_SETRANGE) only work with scrollbar controls, they won't work with the vertical and horizontal "standard scrollbars" associated with a window.  (Just with scrollbar controls inside a window).

If you want to work with a window's "standard scrollbar", you can use the SetScrollInfo() and GetScrollInfo() functions.  
0
 
nietodCommented:
By the way.  Doing this to another application's window could have undesirable effects.  Some programs may assume that these values are certain ranges and may crash or produce weird behaviors when you change them without their "knowing" about it.
0
 
Answers2000Commented:
>>Use SMB_SETRANGE message.

Surely you mean SBM_SETRANGE !
0
 
nietodCommented:
Yes, and stop calling me Shirley  : - )

(It stands for Scroll Bar Message.)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now