Split spin in two buttons

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ghost

    #1

    Split spin in two buttons


    Hi all I hope in an answer that could help me about my problem.

    I'm creating a GUI in Visual C++ .NET and I'd like to split the "Spin
    Control" in two buttons, has someone some ideas to do this?

    The normal spin control
    ------
    | up |
    -------
    |down|
    -------

    I would like to create this

    ------
    | UP |
    ------


    ---------
    | DOWN |
    ---------

    Here there's the code of my "EditBox" and "Spin Control" (normal):
    [color=blue]
    >
    > ((CSpinButtonCt rl *)GetDlgItem(ID C_SPIN_TEST))->SetRange(0, 26);
    > ((CSpinButtonCt rl *)GetDlgItem(ID C_SPIN_TEST))->SetPos(0);
    > GetDlgItem(IDC_ EDITBOXTEXT)->SetWindowText( "A");
    >[/color]



    --
    Ghost
    ------------------------------------------------------------------------
    Posted via http://www.codecomments.com
    ------------------------------------------------------------------------

  • ismailp

    #2
    Re: Split spin in two buttons

    I don't think there exists a simple way. Because control draws those
    buttons, and I don't think you can intervent that default behavior.
    Theoretically, I can suggest you to try to use owner drawing. The best
    is, I think, rolling-your-own split-spin control. I don't think it is
    hard to implement.

    Ismail

    Comment

    Working...