Create Controls at Runtime

Started by Peter Malcolm, May 17, 2012, 03:58:50 PM

Previous topic - Next topic

Peter Malcolm

Can we create controls at runtime with Firefly?    Basically I need to create a number of bitmap and button controls at runtime, as I don't know how many will be required at compile time.   I could just create PowerBasic controls, but then I would be restricted to those controls PowerBasic supplies (eg can't show animated GIFs, nice themed controls etc).

It would be fine to create the first member of a control array at design time, and then add more.

Is this possible?

Thanks!   


James Padgett

Create a bunch of controls and hide what you don't need.  Show as necessary ?

José Roca

Of course they can be created, either using CreateWindowEx or the methods of the CWindow class. But you have to do all the work by yourself.