CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2009
    Posts
    23

    [RESOLVED] how to handle spincontrol

    Hi,

    Seems like editbox allready have a spincontrol attached as default if one use WS_VSCROLL in style while creating the editbox window.
    No WM_VSCROLL message is being sent when clicking on arrow buttons. I read one have to attach spincontrol buddy, but spincontrol is allready there?!? (like pointed out above)

    Can't find any good example on web how to handle spincontrol messages. I tried in Notify and Command without luck.
    How do I handle these up/down arrows?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,398

  3. #3
    Join Date
    Feb 2009
    Posts
    23

    Re: how to handle spincontrol

    yeah, I fixed it. Thanks

  4. #4
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: [RESOLVED] how to handle spincontrol

    Quote Originally Posted by ruderudy View Post
    Seems like editbox allready have a spincontrol attached as default if one use WS_VSCROLL in style while creating the editbox window.
    that creates a vertical scrollbar, not a spin control.

    they're different controls doing different things, although I guess you could abuse a scrollbar to give you the effect of a spin control (you'll need to do this yourself). It's still a bad idea to do it that way, but if you really HAD to do it that way, I suppose you could.

  5. #5
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: [RESOLVED] how to handle spincontrol

    Quote Originally Posted by ruderudy View Post
    How do I handle these up/down arrows?
    As OReubens already said, WS_VSCROLL style does not create spin control, it adds a scrollbar instead. Scrollbar sends WM_VSCROLL messages to its parent, which is the edit box. So, the messages have to be handled there. See the sample attached here.
    Attached Files Attached Files
    Best regards,
    Igor

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured