FF_Control_GetCheck And Select Case

Started by Robert Dunn, June 07, 2008, 06:16:34 PM

Previous topic - Next topic

Robert Dunn

From the help section of FireFly:


'-- FF_Control_GetCheck -------------------------------------------
'
'   Gets the check state of a CheckBox control.
'
'   hWndControl: Handle of control (e.g. HWND_FORM1_CHECK1)
'
'   Returns:     %TRUE if checked or %FALSE if unchecked
'
'------------------------------------------------------------------
Function FF_Control_GetCheck (ByVal hWndControl As Dword) As Long

I have A check box on a form "CHECK1"   I'm trying to use a select case statement
to tell me when there is a check in the check box.   Using the code from the help file above  I Have not been able to tell the status of the check box.   Here is my current code for this function:

Function FORM1_IMAGEBUTTON4_BN_CLICKED ( _
                                       ControlIndex     As Long,  _  ' index in Control Array
                                       hWndForm         As Dword, _  ' handle of Form
                                       hWndControl      As Dword, _  ' handle of Control
                                       idButtonControl  As Long   _  ' identifier of button
                                       ) As Long 
                                       
'Play Button 
FF_Control_GetCheck HWND_FORM1_CHECK1
 
Select Case  GetCheck
Case %FALSE
FF_TextBox_SetText HWND_FORM1_Label2, "        Playing..."
 
Case %TRUE
FF_TextBox_SetText HWND_FORM1_Label2, "Playing...(Continous)"

End Select

This code never seems to work no matter what I set the select case statement to.
I'm guessing here that FF_Control_GetCheck Is some type of a variable to store the returned value in, But I can't seem to get the variable set correctly in case statement.

Could somebody please point me in the right direction ?
Thanks

Robert Dunn

Oh my Gawd,  I feel so stupid..   Lol   I tried this befor: 
Select Case   FF_Control_GetCheck HWND_FORM1_CHECK1  This did not work.
Then I put quotes around it:  Select Case   FF_Control_GetCheck (HWND_FORM1_CHECK1)
Now it works  ;D

Guess I have some serious reading to do...