1. llama AND win32lib ??

David Cuny:
From your comments in llama - Generic.ew you imply that getwindowtext
and getwindowtextlength functions return information about the text in the
window but that is not correct both functions deal with the text in TITLE
bar.
Thanks Bernie

new topic     » topic index » view message » categorize

2. Re: llama AND win32lib ??

Bernie Ryan wrote:

>... you imply that getwindowtext and
> getwindowtextlength functions return
> information about the text in the window,
>  but that is not correct both functions deal
> with the text in TITLE bar.

Not true. The function getWindowText() is a wrapper on the Win32
GetWindowText() function. From the Win32 help file:

"The GetWindowText function copies the text of the specified window's title
bar (if it has one) into a buffer. If the specified window is a control, the
text of the control is copied."

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

3. Re: llama AND win32lib ??

David:
Maybe you don't see what I mean.
if a user calls the function getText_() in llama then how will they know
if they were return a Title or a Control's text. If a control has no title
getlength returns length of text in the control if thats zero then we don't
know if we received a return from a control or a blank title bar.

You should have away to determine if an object is a window or a control
then you could have two methods gettitletext and getcontroltext.
Thanks Bernie

new topic     » goto parent     » topic index » view message » categorize

4. Re: llama AND win32lib ??

Bernie Ryan wrote:

> if a user calls the function getText_() in llama then
> how will they know if they were return a Title or a
> Control's text. If a control has no title getlength returns
> length of text in the control if thats zero then we don't
> know if we received a return from a control or a blank
> title bar.

You've actually answered your own question - you know by the context of the
call.

I agree the naming convention is initially ambigious. But unlike what VB
presents, Win32 controls generally either have titles or text - off the top
of my head I can't think of any control that has both.

 At the point where I selected the name, I had decided that it was important
to follow the Win32/VB convention.  My personal preference is to make the
two distinct, as my TextGUI does - it has seperate Title and Data fields -
much as you've suggested.

> You should have away to determine if an object is
> a window or a control then you could have two methods
> gettitletext and getcontroltext.

I think Win32Lib supplied a function for that; Llama as a function named
something like 'derivedFrom' that does that.

In any event, I'll take it under consideration. It *might* be nice if Llama
created automatic captions for controls as well.

Thanks!

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

5. Re: llama AND win32lib ??

David:
  Why couldn't you send WM_GETTEXT, LB_GETTEXT, etc. messages using your
  "THIS" pointer to the get the text from an object.
  Then it's use would be transparent to the user.
Thanks Bernie

new topic     » goto parent     » topic index » view message » categorize

6. Re: llama AND win32lib ??

Bernie Ryan asked:

> Why couldn't you send WM_GETTEXT,
> LB_GETTEXT, etc. messages using your
> "THIS" pointer to the get the text from an object.

Yes, of course.

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu