Add controls to a control array at runtime?

Started by Brian Chirgwin, March 08, 2008, 01:05:06 AM

Previous topic - Next topic

Brian Chirgwin


There is a FF_CONTROL_KILL command which removes a control at runtime.

Using CreateWindow or CreateWindowEx controls can be created.

I have a control array and would like to add controls at runtime to the control array as I am not sure at design time the number I will need.

Is it possible? How would this be accomplished?

Would the newly added controls respond to the existing code for events?


TechSupport

Hi Brian,

There is no easy way to add controls to a control array during runtime. If you had an idea of the number of controls that you needed then you could create them at design time and set their WS_VISIBLE property to FALSE until you needed them. Sorry.