PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: David Kenny on May 21, 2009, 02:57:37 PM

Title: FF_TreeView_GetImage problem
Post by: David Kenny on May 21, 2009, 02:57:37 PM
Hello Paul,

I was trying to get the image index on a Treeview item and it seemed to be setting it to zero instead.
Below is an excerpt from the code generated by FF. I think the Treeview_SetItem call should be Treeview_GetItem.

Function FF_TreeView_GetImage (ByVal hWndControl As Long, _
                               ByVal hItem As Long) As Long

    Local ti As TV_ITEM

    ' Do a check to ensure that this is actually a window handle
    If IsWindow(hWndControl) Then 
     
        ti.hItem          = hItem                                       
        ti.mask           = %TVIF_HANDLE Or %TVIF_IMAGE
     
        If TreeView_SetItem (hWndControl, ti ) = 0 Then
           Function = -1
        Else
           Function = ti.iImage   
        End If   
   
    End If

End Function


Thanks,

David

PS WOW! I got my Code Warrior status with this post!
Title: Re: FF_TreeView_GetImage problem
Post by: Elias Montoya on May 21, 2009, 03:06:14 PM
 You are right, that function is wrong. Last year i also
found that FF_Control_GetFont() was wrong, and i think
Paul fixed it. Let him know about this and most likely
he will take care of this. :)
Title: Re: FF_TreeView_GetImage problem
Post by: TechSupport on May 21, 2009, 08:37:06 PM
Yes, oops! 

Please copy the attached file (that's in the zip file) to your FireFly installation folder.