PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Dennis Allen on March 18, 2015, 05:07:03 PM

Title: Up Down Control
Post by: Dennis Allen on March 18, 2015, 05:07:03 PM
Hi,

I looked at the posts I found here on using the control. I placed the suggested code in the custom handler of the form on which the Up Down resides, and nothing happens.
The main form is blank except for the up down control.

here is the example I found

   Local pUpDown As NM_UPDOWN Ptr
   
   Select Case wMsg
      Case %WM_NOTIFY
         pUpDown = lParam
         If @pUpDown.hdr.idFrom = IDC_FRMCREATETBL_UPDOWN1 Then
            If @pUpDown.hdr.Code = %UDN_DELTAPOS Then
               If @pUpDown.iDelta = -1 Then 'Down
                  MsgBox "DOWN"
               Else   'Up
                  MsgBox "UP"
               End If                     
            End If                           
         End If   
      Case Else                             
   End Select                                     

There must be something about the pointer that I am missing, Can you help?
Thank you in advance.

Ron
Title: Re: Up Down Control
Post by: Elias Montoya on March 18, 2015, 07:25:15 PM

Can you put more code? Case else not required, otherwise this looks good.
Title: Re: Up Down Control
Post by: Dennis Allen on March 18, 2015, 07:50:19 PM
Hi,

I appreciate you help. I was using
HWND_FORM1_UPDOWN1
instead of

IDC_FORM1_UPDOWN1
Title: Re: Up Down Control
Post by: Dennis Allen on March 18, 2015, 07:52:01 PM
Hi,

And thank you much as my wife's cat pushed my hand away during my response.
best wishes,

Ron
Title: Re: Up Down Control
Post by: Elias Montoya on March 18, 2015, 10:28:20 PM
 Yup, it sounded like a wrong handle mistake.  :)