1. Re: Visual Euphoria Library Question
Hi Mike,
If Terry's solution doesn't work, you could create a "Panel" on the form
with the ALIGN attribute set to ACLIENT. Then you could get the height and
width of the Panel. Crude, but it should work. BTW, you could set the
Panel's VISIBLE attribute to FALSE so it will not appear on the form.
However, the real solution is that CLIENTHEIGHT and CLIENTWIDTH will be
available in version 0.05 due for release in about a week.
Gary.
>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