Adding combo boxes to dialog at runtime 
Author Message
 Adding combo boxes to dialog at runtime

Hi,

I have a modal dialog in which there is a combo box and an edit box.
When I click a button named "More" I want to increase the size of the
dialog window and add an extra combo box and an edit field, and also
move the "More" button.

Does anyone know how to to this? It would be even better if you'd have
some sample code for me or some useful link perhaps.

For an illustration of my problem, please check the search function for
mail in Netcape (menu choice 'View'->'Search Messages'). I want to do
exactly that!

Cheers,
Martin



Sat, 12 Jul 2003 22:45:54 GMT  
 Adding combo boxes to dialog at runtime
The simplest way is to have hidden combo box and edit field.

During OnInitDialog() set the combo box size to the minimum size. which does
not include the hidden fields.

On click of the more button, use

        SetWindowPos() or MoveWindow() to resize the dialog box and also
make the hidden fields visible.

        Use MoveWindow() on the More button to move it.

Cheers
Check Abdoul
--------------------


Quote:
> Hi,

> I have a modal dialog in which there is a combo box and an edit box.
> When I click a button named "More" I want to increase the size of the
> dialog window and add an extra combo box and an edit field, and also
> move the "More" button.

> Does anyone know how to to this? It would be even better if you'd have
> some sample code for me or some useful link perhaps.

> For an illustration of my problem, please check the search function for
> mail in Netcape (menu choice 'View'->'Search Messages'). I want to do
> exactly that!

> Cheers,
> Martin



Sat, 12 Jul 2003 23:02:28 GMT  
 Adding combo boxes to dialog at runtime
I guess it would work to add a number of hidden combo boxes that I show one at a
time when clicking the "More" button. The thing is that I would like to be able
to add an arbitrary number of boxes, not just a maximum of say 10 (or how many
one chooses to add in the dialog creation).

Any suggestions on how to solve the 'arbitrary number of combo boxes' problem
would be greatly appreciated!

Cheers,
Martin

Quote:

> The simplest way is to have hidden combo box and edit field.

> During OnInitDialog() set the combo box size to the minimum size. which does
> not include the hidden fields.

> On click of the more button, use

>         SetWindowPos() or MoveWindow() to resize the dialog box and also
> make the hidden fields visible.

>         Use MoveWindow() on the More button to move it.

> Cheers
> Check Abdoul
> --------------------



Sat, 12 Jul 2003 23:54:13 GMT  
 Adding combo boxes to dialog at runtime
Perhaps the easiest thing would be to create a load a new dialog box.  If
there is user input from the original one, save it in member variables or a
struct then reload that into the new dialog.

Hope it helps -
Ron G{*filter*}

Quote:
> Hi,

> I have a modal dialog in which there is a combo box and an edit box.
> When I click a button named "More" I want to increase the size of the
> dialog window and add an extra combo box and an edit field, and also
> move the "More" button.

> Does anyone know how to to this? It would be even better if you'd have
> some sample code for me or some useful link perhaps.

> For an illustration of my problem, please check the search function for
> mail in Netcape (menu choice 'View'->'Search Messages'). I want to do
> exactly that!

> Cheers,
> Martin



Sun, 13 Jul 2003 09:11:32 GMT  
 Adding combo boxes to dialog at runtime
Martin,
Look at CComboBox::Create
Jonno


Quote:
> I guess it would work to add a number of hidden combo boxes that I show
one at a
> time when clicking the "More" button. The thing is that I would like to be
able
> to add an arbitrary number of boxes, not just a maximum of say 10 (or how
many
> one chooses to add in the dialog creation).

> Any suggestions on how to solve the 'arbitrary number of combo boxes'
problem
> would be greatly appreciated!

> Cheers,
> Martin


> > The simplest way is to have hidden combo box and edit field.

> > During OnInitDialog() set the combo box size to the minimum size. which
does
> > not include the hidden fields.

> > On click of the more button, use

> >         SetWindowPos() or MoveWindow() to resize the dialog box and also
> > make the hidden fields visible.

> >         Use MoveWindow() on the More button to move it.

> > Cheers
> > Check Abdoul
> > --------------------



Mon, 14 Jul 2003 00:18:34 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Add Combo Box to Dialog Box

2. Add a combo box in a dialog box...

3. Create a Combo Box at runtime

4. scroll combo box added in the c# DataGrid control

5. DBGrid Control adding Combo Box

6. Adding items to combo boxes

7. Adding items to combo boxes

8. Adding items to combo boxes

9. Adding items to combo boxes

10. how to add items to Combo Box control?

11. Adding data to a combo box

12. Toolbar:Dynamically adding a combo box

 

 
Powered by phpBB® Forum Software