Solved

creating dynamic controls

Posted on 2001-06-17
4
144 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand macro to ask for filename column 8 37
viewing source code from eclipse 13 110
either24  challenge 19 101
Is there a simple front-end menu system. 9 103
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

860 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