I'm having some trouble with this control for some reason...
I'm using a form with two picture controls set to an array, Picture4(0) and Picture4(1).
Code from the "Function FORM1_PICTURE4_STN_CLICKED"
Function FORM1_PICTURE4_STN_CLICKED ( _
ControlIndex As Long, _ ' index in Control Array
hWndForm As Dword, _ ' handle of Form
hWndControl As Dword, _ ' handle of Control
idStaticControl As Long _ ' identifier of static control
) As Long
FF_Control_ShowState %HWND_FORM1_PICTURE4(1), %SW_HIDE
End Function
I'm trying to set this up so that when the picture is clicked, It sets Picture4(1) to hidden.
When I compile this I get an error code of 460. Undefined Equate FF_Control_ShowState %HWND_FORM1_PICTURE4(1), %SW_HIDE
I'm not catching on to what I'm doing wrong here. Any Ideas ?
Thanks,
Robert
Well I looked through some of the posts in this area and something caught my eye.
I changed this: FF_Control_ShowState %HWND_FORM1_PICTURE4(1), %SW_HIDE
to this:
FF_Control_ShowState (HWND_FORM1_PICTURE4(1), %SW_HIDE)
Now it seems to work fine...
Why does enclosing the (HWND_FORM1_PICTURE4(1), %SW_HIDE) Make it work?
Robert
Well I thought I would play with it a bit more. Now I changed it from this:
(HWND_FORM1_PICTURE4(1), %SW_HIDE)
to this:
HWND_FORM1_PICTURE4(1), %SW_HIDE
It still works fine ;D
It would seem that Just removing the Percentage sign in front of HWND is enough to let it function... What is that first prercentage sign used for ? %HWND
The percentage sign in front of the variable indicates that the it is an equate. Without the % sign, it is a simple variable (well, in your case it is an array of variables). FireFly creates simple global variables to hold the values of the window handles and control identifiers. Other programs may use equates.
You should check out the PB help file if the meaning of equates and variables is not clear.