1. Greg Haberek's Window Monitor - Interesting Results

All,

I just tried Greg's Window Monitor (since I'm interested in doing 
something similar). 

It was interesting to find many entries in the results for "Win32Lib 
AppWindow".  I could tell that most of them were for Win32Lib based apps 
I was currently running but entries showed up for Windows that were 
currently not being displayed (or had never been displayed).  I also 
found an entry for a child window in a Win32Lib app that was not 
running.  

The other thing I noticed there were about 28 entries for 
"tooltips_class32" which I also found a reference to in Win32Lib.

I'm wondering if somehow I'm not shutting things down correctly.  I use 
the standard closeWindow() but is that enough?

Jonas

new topic     » topic index » view message » categorize

2. Re: Greg Haberek's Window Monitor - Interesting Results

----- Original Message -----
From: "Jonas Temple" <jtemple at yhti.net>
To: "EUforum" <EUforum at topica.com>
Subject: Greg Haberek's Window Monitor - Interesting Results


>
> All,
>
> I just tried Greg's Window Monitor (since I'm interested in doing
> something similar).
>
> It was interesting to find many entries in the results for "Win32Lib
> AppWindow".  I could tell that most of them were for Win32Lib based apps
> I was currently running but entries showed up for Windows that were
> currently not being displayed (or had never been displayed).  I also
> found an entry for a child window in a Win32Lib app that was not
> running.
>
> The other thing I noticed there were about 28 entries for
> "tooltips_class32" which I also found a reference to in Win32Lib.
>
> I'm wondering if somehow I'm not shutting things down correctly.  I use
> the standard closeWindow() but is that enough?
>

Jonas,
the closeWindow() routine only hides the window, unless its the main window,
in which case the app closes down. To totally remove windows, use destroy()
instead.

closeWindow() is good for windows that are constantly opening and closing
again. Its faster than doing a create/destroy sequence.
----------------
cheers,
Derek Parnell

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

3. Re: Greg Haberek's Window Monitor - Interesting Results

Keep in mind my Windows Monitor is a Win32Lib-based app, so any windows that
Win32Lib creates on
its own will still show up.

Here is some info on destroy():

-- begin snip from win32lib.htm --

[proc]
destroy ( id )
Destroy an object created with the create function.
Category: Attributes

>>  When a control is destroyed, it releases its resources back to Windows. This
>>  also means that
a parent control also destroys its child controls. <<

When the control being destroyed is a Window, it cannot be reopened. If you want
to be able to
reopen a window, use closeWindow() instead of destroy().

When this is called, but before the control is actually destroyed, the
w32HDestroy event is
triggered, enabling you to clean up things associated with this control. Or even
prevent the
control from being destroyed, by returning -1 from the event handler.

The following will destroy a pushbutton called MyButton.


      -- destroy a pushbutton
      destroy( MyButton )

-- end snip --

Since a Window destroys its children (sounds lovely, doesn't it?) shouldn't that
free up all
resources when the program exits? (unless there is a leak in Win32Lib). And when
I call
closeWindow() to close my program, does it destroy() my window also? or should I
call destroy()
to closee the program?



----- Original Message -----
From: Jonas Temple <jtemple at yhti.net>
To: EUforum <EUforum at topica.com>
Sent: Monday, April 07, 2003 11:55 AM
Subject: RE: Greg Haberek's Window Monitor - Interesting Results



Wow, so all this time I've not been closing my programs down
incorrectly.

As a suggestion, would it be possible to automatically call destroy()
when the main window is referenced in a call to closeWindow()?

Does this explain why there were so many entries for "tooltip_class32"?


Jonas
Derek Parnell wrote:
> Jonas,
> the closeWindow() routine only hides the window, unless its the main
> window,
> in which case the app closes down. To totally remove windows, use
> destroy()
> instead.
>
> closeWindow() is good for windows that are constantly opening and
> closing
> again. Its faster than doing a create/destroy sequence.
> ----------------
> cheers,
> Derek Parnell



TOPICA - Start your own email discussion group. FREE!

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

4. Re: Greg Haberek's Window Monitor - Interesting Results

----- Original Message -----
From: "Greg Haberek" <g.haberek at comcast.net>
To: "EUforum" <EUforum at topica.com>
Subject: Re: Greg Haberek's Window Monitor - Interesting Results


[snip]

> Since a Window destroys its children (sounds lovely, doesn't it?)
shouldn't that free up all
> resources when the program exits? (unless there is a leak in Win32Lib).

Yes. All resources are freed when a win32lib app closes.

>And when I call
> closeWindow() to close my program, does it destroy() my window also?

Yes it does.

>or should I call destroy() to closee the program?

There is no need to do this. In fact, if you destroy the main window, it
also closes the application.

----------------
cheers,
Derek Parnell

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

5. Re: Greg Haberek's Window Monitor - Interesting Results

----- Original Message -----
From: "Jonas Temple" <jtemple at yhti.net>
To: "EUforum" <EUforum at topica.com>
Subject: RE: Greg Haberek's Window Monitor - Interesting Results


>
> Wow, so all this time I've not been closing my programs down
> incorrectly.

Where did you get that from? Maybe I didn't make myself very clear. The
algorithm is ...

 if window is main-window then
     destroy it and its children
     end the application
 else
     hide the window
 end if


> As a suggestion, would it be possible to automatically call destroy()
> when the main window is referenced in a call to closeWindow()?

It already does.

> Does this explain why there were so many entries for "tooltip_class32"?

No. This name is used by ALL applications that use tooltips, not just
win32lib apps.

----------------
cheers,
Derek Parnell

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

Search



Quick Links

User menu

Not signed in.

Misc Menu