Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Trackbar/Sliderbar problem

Trackbar/Sliderbar problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpjson
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    scody
    wrote on last edited by
    #1

    Hi, I am new to windows programming. I want to change the slider bar position of a third party software (using WinAPI only), which I have accomplished by sending message. SendMessage( aControlHWnd, TBM_SETPOS, (WPARAM) TRUE, (LPARAM) aPosition ); Now, the position of the sliderbar it is changed, but the corresponding values in other objects (like textbox showing the value related to this sliderbar) are not updated. I can only use Win API and donot have any access to the event handlers, but if the slider is moved manually by mouse the corresponding values in other objects (like textbox showing the value related to this sliderbar) are also changed. So I am assuming that an event handler already exists in the software which automatically updates other related objects. Now I just need to send the right message to the right handler to accomplish the task. Any help would be greatly appriciated. Thanks.

    N 1 Reply Last reply
    0
    • S scody

      Hi, I am new to windows programming. I want to change the slider bar position of a third party software (using WinAPI only), which I have accomplished by sending message. SendMessage( aControlHWnd, TBM_SETPOS, (WPARAM) TRUE, (LPARAM) aPosition ); Now, the position of the sliderbar it is changed, but the corresponding values in other objects (like textbox showing the value related to this sliderbar) are not updated. I can only use Win API and donot have any access to the event handlers, but if the slider is moved manually by mouse the corresponding values in other objects (like textbox showing the value related to this sliderbar) are also changed. So I am assuming that an event handler already exists in the software which automatically updates other related objects. Now I just need to send the right message to the right handler to accomplish the task. Any help would be greatly appriciated. Thanks.

      N Offline
      N Offline
      Nishad S
      wrote on last edited by
      #2

      When you change the position of the slider, some messages will be sent to the parent. If you send those messages by yourself to the parent of the slider in the same manner you did for the slider, I believe you will get what you expected. You can watch the messages using Spy++. WM_HSCROLL or WM_VSCROLL messages will be they. You can identify the message parameters by refering MSDN.

      - NS -

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups