Solved

creating dynamic controls

Posted on 2001-06-17
4
145 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Include multiple hostnames in this command? 3 55
Replacement selected text 2 66
Best tools for Backup and restore of Wordpress site 6 58
wordcount challenge 11 146
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

749 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