FF_Control_GetFont Problem

Started by Elias Montoya, March 14, 2008, 08:02:18 PM

Previous topic - Next topic

Elias Montoya


I am using this:

hFont     = FF_Control_GetFont(HWND_CUSTOMPROPERTIES_LABEL2)

The label is valid and has a font, however, hFont receives a null value (0), ideas?

Elias Montoya

#1
 I found the problem in the generated source code...

'------------------------------------------------------------------
FUNCTION FF_Control_GetFont (BYVAL hWndControl AS DWORD) AS LONG
   
    ' Do a check to ensure that this is actually a window handle
    IF IsWindow(hWndControl) THEN 
       
       ' Get the current font
         SendMessage hWndControl, %WM_GETFONT, 0, 0
       
    END IF
       
END FUNCTION   


Should Be...

'------------------------------------------------------------------
FUNCTION FF_Control_GetFont (BYVAL hWndControl AS DWORD) AS LONG
   
    ' Do a check to ensure that this is actually a window handle
    IF IsWindow(hWndControl) THEN 
       
       ' Get the current font
        FUNCTION = SendMessage(hWndControl, %WM_GETFONT, 0, 0)

    END IF
       
END FUNCTION
 

TechSupport

Hi Elias,

Right you are! I can't believe I never noticed that error over the last couple of years. I guess that I don't use the GetFont function. :)