CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2001
    Location
    Singapore
    Posts
    200

    Questions regarding CSpinButtonCtrl

    I have created a few CSpinButtonCtrl in the dialog boxes.

    Using the UDN_DELTAPOS message, I will be able to determine whether the user has pressed on the up or down arrow of the control. The iDelta in the NMUPDOWN struct will return +1 when the user clicks on the up arrow while it will return -1 when the user clicks on the down arrow of the spin control.

    This works out out fine for the CSpinButtonCtrl that i have created except for 1 which is created for the mainframe. This spin control will return iDelta = -1 when the user clicks on the up button while it will return iDelta = +1 when the user clicks on the down button.

    Does anybody knows whats the problem?

  2. #2
    Join Date
    Apr 1999
    Posts
    3,585
    From MSDN, this is probably your problem:
    Any time the minimum setting is greater than the maximum setting (for example, when the default settings are used), clicking the up arrow decreases the position value and clicking the down arrow increases it.
    Gort...Klaatu, Barada Nikto!

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