Solved

creating dynamic controls

Posted on 2001-06-17
4
141 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
Comment Utility
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
Comment Utility
Hello!
anybody here?
none??
so I lock this Q.
0
 
LVL 11

Expert Comment

by:griessh
Comment Utility
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
Comment Utility
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now