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++ ?
Printable View
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++ ?
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.
something like this...
and you can just make another variable to make sure the text boxes (edit boxes) don't overlap each other :)PHP Code:int numBoxes = 5; //or any other number
HWND box[numBoxes];
for(int i=1; i<=numBoxes; i++) {
CreateWindow(....);
}
except that
HWND box[numBoxes]; will create an error...