[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 151
  • Last Modified:

creating dynamic controls

I am supposed to create dynamic controls at runtime. I have to create a class that accepts some parameters, based on the active window. Then based on the parameter, it has to create controls at run time, in the left pane. The number of controls and their type varies based on the active window in the right pane.

Then, I need to handle the values from the controls that are created. I may have to maintain a string table or something for all the controls created and then handle it seperately.

I am new to VC++ and any help will be greatly appreciated. Any sample code or location of examples will be a lot of help. Please help.
0
ezee
Asked:
ezee
  • 2
1 Solution
 
migelCommented:
Hi
You can store some info aboute created controls in the right pane:
for example:
struct DynControlInfo
{
HWND hwndCtl;
BYTE  cbCtlType; // edit box button and so on;
}

and maintain list(or vector) of this structs in the pane
When you need get data from dyn control just traverse this list(vector) and use API ::GetWindowText()...
0
 
migelCommented:
Hello!
anybody here?
none??
so I lock this Q.
0
 
griesshCommented:
Unless there is objection or further activity,  I will suggest to accept

     "migel"

comment(s) as an answer.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
MindphaserCommented:
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now