|
-
Dec 13th, 2001, 08:21 PM
#1
Thread Starter
Frenzied Member
VB-like Control array in C++ ??
I have a VB application which adds Text Boxes to (or removes them from) a Form at run time, depending on how many I need at a particular time.
Can this be done in C++ ?
Live long & prosper.
The Dinosaur from prehistoric era prior to computers.
Eschew obfuscation!
If a billion people believe a foolish idea, it is still a foolish idea!
VB.net 2010 Express
64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.
-
Dec 13th, 2001, 08:25 PM
#2
Frenzied Member
It ceratinly can. You can create, delete and modify any window in your program at any time, and a control is just a specific kind of window.
If you're interested in doing it with MFC rather than the WIndows API way, I couldn't tell you for sure, but I am pretty certain it won't be difficult.
Harry.
"From one thing, know ten thousand things."
-
Dec 13th, 2001, 10:47 PM
#3
Frenzied Member
something like this...
PHP Code:
int numBoxes = 5; //or any other number
HWND box[numBoxes];
for(int i=1; i<=numBoxes; i++) {
CreateWindow(....);
}
and you can just make another variable to make sure the text boxes (edit boxes) don't overlap each other
-
Dec 14th, 2001, 08:00 AM
#4
except that
HWND box[numBoxes]; will create an error...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|