Reading a TrackBar's position.

This is a discussion on Reading a TrackBar's position. within the C++ Programming forums, part of the General Programming Boards category; I have this Trackbar with the handle of 'hTrackVolume' and with a control ID of 104. I have set up ...

  1. #1
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342

    Question Reading a TrackBar's position.

    I have this Trackbar with the handle of 'hTrackVolume' and with a control ID of 104. I have set up all of it's parameters. But it's useless if I don't know how to detect it's position. How do I do that?

    Thanks in advance, August.

  2. #2
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    You can't using standard C/C++. You can using whatever OS platform you use as a target for your project. This site offers boards specializing in C#, Windows and Linux OS. Posting on the board appropriate for your target is the best idea I can give you at the moment.
    You're only born perfect.

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    You can literally find this in a matter of seconds on MSDN. Anyway, you'll want to use the message TBM_GETPOS
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  4. #4
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    I don't know how or where or with what functon I need to use it though.
    Could you enlighten me?

  5. #5
    Registered User
    Join Date
    Jul 2005
    Posts
    69
    Something like:
    Code:
    DWORD dwPos;
    dwPos = SendDlgItemMessage(hDlg, IDC_SLIDER1, TBM_GETPOS, 0, 0);

  6. #6
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    You've been here long enough, Cool-August, to know not to cross-post(see 4.):

    Reading a TrackBar's position.

    It's also a windows specific question.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  7. #7
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Continue this in the thread on the Windows board. Link in KF's post.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 05-08-2009, 05:25 AM
  2. how to combine these working parts??
    By transgalactic2 in forum C Programming
    Replies: 0
    Last Post: 02-01-2009, 08:19 AM
  3. Replies: 6
    Last Post: 04-28-2006, 01:06 PM
  4. reading in one character at a time
    By isotope1 in forum C++ Programming
    Replies: 2
    Last Post: 01-26-2006, 12:55 PM
  5. Reading a TrackBar's position.
    By Queatrix in forum Windows Programming
    Replies: 2
    Last Post: 08-24-2005, 06:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21