CSpinButtonCtrl - Welche Richtung ist aktiv ?



  • Gibt es eine möglichkeit, bei einer SPincontrol zu sagen, ob der auf bzw. ab pfeil gedrückt wurde ??

    Ich kann leider mit folgender lösung nix anfangen, da ich nicht nach Werten, sonder nach Zeit arbeiten soll.

    void OnVScroll(int nSBCode,int nPos, CScrollBar* pScrollBar)
    {
    static int nOldPos = m_pSpinControl->GetPos();

    if(nOldPos - m_pSpinControl->GetPos() > 0)
    {
    // RUNTER
    }
    else
    {
    // RAUF
    }

    nOldPos = m_pSpinControl->GetPos();
    }



  • Original erstellt von MS. Developer Network:
    nSBCode
    Specifies a scroll-bar code that indicates a scrolling request by the user. This parameter can be one of the following:
    SB_BOTTOM Scroll to bottom.
    SB_ENDSCROLL End scroll.
    SB_LINEDOWN Scroll one line down.
    SB_LINEUP Scroll one line up.
    SB_PAGEDOWN Scroll one page down.
    SB_PAGEUP Scroll one page up.
    SB_THUMBPOSITION Scroll to the absolute position. The current position is provided in nPos.
    SB_THUMBTRACK Drag scroll box to specified position. The current position is provided in nPos.
    SB_TOP Scroll to top.



  • Das ist ein Irrtum:

    Ein SPINCONTROL sendet NUR: SB_THUMBPOSITION und SB_ENDSCROLL !!!!


Anmelden zum Antworten