> I am writing a Windows application using Borland C/C++ compiler
>(ver 3.1). At a particular point in my program I want to create a
>dynamic modal dialog box. Depending upon a particular parameter input
>by the user I want to create a certain no. of CheckBoxes in the dialog
>box. This dialog box has to be created from another dialog box and not
>from the main window. As I cannot use the .rc file to create the dialog
>box, I am stumped as what to do. Could'nt find the solution elsewhere
>so I am posting the question.
>I would appreciate if someone could guide me to the same.
I was faced with a similar problem. I've written a general-purpose
screen handler for MS-DOS. It takes a pointer to an array of
structures describing fields the user can fill in (length, type,
position on screen, etc.). Because my program had to have access
to this information, and possibly modify it dynamically (like you
want), a normal dialog box, whose .RC file is outside the program
and therefore inaccessible, was out. I solved the problem the hard
way - the Windows version of my routine opens a window of its own
and then opens a series of child controls in it according to the
specification table. You'll probably have to subclass the edit
controls to handle tabbing, etc. It's a bit more complex, but
retains the flexibility and portability that I need. Best of all,
it's a piece of code that I wrote once and can re-use anywhere.
MS-DOS: I hate it, but I use it - twice a day.