1. Re: Visual Euphoria Library Question
Mike Hurley wrote:
>Gary-
>
>If I make a Window (Form) that is 200x200, WIDTH will be 200 and HEIGHT
will
>be 200, which is the height and width of the Form. I want the height and
>width of the Form's client area, where writing and drawing is done.
>
>Mike Hurley
>
Mike, the following function is written with compatibility of
David's Win32lib in mind.
It returns a 2-element sequence {client width, client height}
global function getclientrect(integer id)
integer gcr_rect
sequence gcr_ret
gcr_rect = allocate(SIZEOF_RECT)
if not c_func(xGetClientRect, {window_handle[id], gcr_rect}) then
warnErr( "GetClientRect failed." )
end if
gcr_ret = peek4u({gcr_rect+08, 2}) --first 2 co-ordinates are 0,0
-- so only return last 2.
free(gcr_rect)
return gcr_ret
end function
Hope this helps with the visual euphoria problem
Terry