Solved

creating dynamic controls

Posted on 2001-06-17
4
143 Views
Last Modified: 2013-11-20
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
Comment
Question by:ezee
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
migel earned 300 total points
ID: 6201236
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
 
LVL 12

Expert Comment

by:migel
ID: 6276379
Hello!
anybody here?
none??
so I lock this Q.
0
 
LVL 11

Expert Comment

by:griessh
ID: 7202173
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
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7220554
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

823 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question