You're welcome.
>Thanks Sergey, that's sorted it.
>
>Jon
>
>>Hi Jon,
>>
>>You hit a VFP bug. When Windows API function is declared w/o alias VFP releases any previous declarations with an alias.
>>You can use a trick from GdiPlusX. Comment out DECLARE and create following function. If GS_SplitReleaseDC is not declared yet, the function will be called. Otherwise the function in DLL will be called.
>>
>>FUNCTION GS_SplitReleaseDC(hWnd, HDC)
>>DECLARE Long ReleaseDC IN WIN32API AS GS_SplitReleaseDC Long hWnd, Long HDC
>>RETURN GS_SplitReleaseDC(m.hWnd, m.HDC)
>>
--sb--