🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.programmer
3 messages
3 total messages Started by Ceki Gulcu Sat, 11 Apr 1992 19:23
"Killing" child windows
#669
Author: Ceki Gulcu
Date: Sat, 11 Apr 1992 19:23
28 lines
1694 bytes
I'm currently porting a character-mode based OS/2 application to PM. The
program in question is DoublesFinder. It finds files having the same name
(thus, probably redundant) across drives. The character based form did not
have shoot&delete capabilty, the PM version will. 

This is what I do:

A clientWindow is created using WinCreateStdWindow. Inside this window
files having the same name are displayed (one file per line). Then a number
of child windows are created. These child windows are just checkboxes. Each
checkbox is displayed next to a file name. When a checkbox is checked this
means that the file next to it will be deleted (at some future time).

Here is the question:

The number of child windows should correspond to the number of files 
displayed. Since the number of files displayed changes as the size of the
client window changes, I should be able to create/kill child windows as
necessary. Creating is no problem, but I cannot "kill" any checkboxes.

Can you help me on this? 

GULCU Ceki

ps: I've a workaround which is far from being elegant: I create a large
    number of checkboxes (larger then the number of files that can
    ever be displayed i.e > 200 ). The checkboxes which cannot be displayed
    are just clipped. This wastes memory. 
Re: "Killing" child windows
#670
Author: Ceki Gulcu
Date: Sat, 11 Apr 1992 20:05
9 lines
773 bytes
Actually the workaround I was talking about does dont even work. If only say
two files are redundant and the client window has enough room to display 10
files then they are 8 (=10-2) checkboxes which  "hang" out in the open...

I really (desperately) need to to be able to kill child windows.

Help! Please?

GULCU Ceki
Re: "Killing" child windows
#672
Author: Michael Harris
Date: Sun, 12 Apr 1992 03:24
20 lines
1514 bytes
gulcu@masg1.epfl.ch (Ceki Gulcu) writes:

>I really (desperately) need to to be able to kill child windows.

Are you saying that you don't know how to kill the child windows or that
the child windows won't die?

If you don't know how to kill them, look up WinDestroyWindow.  If you are
already using WinDestroyWindow, then are you using the correct window
handles?  If you are using WinWindowFromID to get the correct window handles,
are the window id's unique on your application window?

It seems to me that it would be a whole lot easier to just throw up a
multiple-select listbox.  It sure would use a whole lot fewer windows.
(I haven't seen your application so this may not be a desirable option.)

______________________________________________________________________________
     Michael Harris - harris@catt.ncsu.edu or harris@carvm3.vnet.ibm.com
 Vice-President, Computer and Technologies Theme Program, NC State University
(My opinions are my own and do not represent those of NCSU or IBM Corporation)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads