Announcement

Collapse
No announcement yet.

UpDown32 Control

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • UpDown32 Control

    I have the following problem:
    Code:
    %ID_UPDOWN = 800
    Control Add "msctls_updown32",hDlg,%ID_UPDOWN,35,20,20,13,%WS_CHILD Or %WS_BORDER Or %WS_VISIBLE Or %UDS_WRAP Or %UDS_ARROWKEYS Or %UDS_HORZ
    I don't want a buddy control to it, but just an event on change. Win32 help says that %WM_HSCROLL is generated. Thats true, but CbCtl doesn't return the controls %ID_UPDOWN, so I don't know which control caused the event. (%WM_HSCROLL is generated twice on control change).
    Also I'd like to set the step size of the control (I want it to increment 30 on one step). Is that possible, or should I multiply it myself?

    Peter
    Regards,
    Peter

  • #2
    If you can get the handle to your control then you can determine
    which control it is when the WM_HSCROLL message is sent to your
    parent window from the lParam.

    WM_HSCROLL

    nScrollCode = (int) LOWORD(wParam); // scroll bar value
    nPos = (short int) HIWORD(wParam); // scroll box position
    hwndScrollBar = (HWND) lParam; // handle of scroll bar
    HTH
    Regards, Jules

    ------------------
    Best regards
    Jules
    www.rpmarchildon.com

    Comment

    Working...
    X