Adding Controls in Runtime
-
I'm Frustrated. in .NET a easy Control.Add(new TextBox()) will create a textbox during runtime. Do anyone know of a way to add controls to a panel during runtime? (or form) And also may someone point me to some litrature that *explains* the advanced methods with respect to controls and control containers in C++ VCL? Appreciate it
-
I'm Frustrated. in .NET a easy Control.Add(new TextBox()) will create a textbox during runtime. Do anyone know of a way to add controls to a panel during runtime? (or form) And also may someone point me to some litrature that *explains* the advanced methods with respect to controls and control containers in C++ VCL? Appreciate it
You can use of
Create
orCreateWindow
or you can declare a variable for example CButton m_button; m_Button.Create(...); and after create it declare events for it.
WhiteSky
-
I'm Frustrated. in .NET a easy Control.Add(new TextBox()) will create a textbox during runtime. Do anyone know of a way to add controls to a panel during runtime? (or form) And also may someone point me to some litrature that *explains* the advanced methods with respect to controls and control containers in C++ VCL? Appreciate it
In addition to WhiteSky's reply... Everything you ever wanted to know (and more) about Windows controls can be found here: Individual Control Information[^] Mark
Mark Salsbery Microsoft MVP - Visual C++ This episode brought to you by the letter Z
-
In addition to WhiteSky's reply... Everything you ever wanted to know (and more) about Windows controls can be found here: Individual Control Information[^] Mark
Mark Salsbery Microsoft MVP - Visual C++ This episode brought to you by the letter Z
Thanks for Info, I got it. The Create and CreateWindows seemed to be a bit low level programming. I found a InsertControl(TWinControl*) on the panel that i missed. It works perfect. I program in Borland using VCL - so the Create does not exist. Thanks anyhow.
-
Thanks for Info, I got it. The Create and CreateWindows seemed to be a bit low level programming. I found a InsertControl(TWinControl*) on the panel that i missed. It works perfect. I program in Borland using VCL - so the Create does not exist. Thanks anyhow.
InOut.NET wrote:
I program in Borland using VCL
:omg: I missed that :) We were referring to Windows APIs, so yes, low level. Cheers! Mark
Mark Salsbery Microsoft MVP - Visual C++ This episode brought to you by the letter Z