🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #669

"Killing" child windows

#669
From: 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. 
Technical Details
Message-ID: <1992Apr11.212327@masg1.epfl.ch>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!swrinde!mips!darwin.sura.net!Sirius.dfn.de!chx400!sicsun!masg1.epfl.ch!gulcu

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!swrinde!mips!darwin.sura.net!Sirius.dfn.de!chx400!sicsun!masg1.epfl.ch!gulcu
From: gulcu@masg1.epfl.ch (Ceki Gulcu)
Newsgroups: comp.os.os2.programmer
Subject: "Killing" child windows
Message-ID: <1992Apr11.212327@masg1.epfl.ch>
Date: 11 Apr 92 19:23:27 GMT
Sender: news@sicsun.epfl.ch
Organization: Ecole Polytechnique Federale de Lausanne
Lines: 28