Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding controls in the fly
Message
General information
Forum:
Visual C++
Category:
Microsoft Foundation Classes
Miscellaneous
Thread ID:
00678495
Message ID:
00678606
Views:
9
>what is the way for add controls like commandbutton in a form in runtime?

Francisco,
It's very easy:

CButton myButton1;
// Create a push button.
myButton1.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,
CRect(10,10,100,30), pParentWnd, 1);

Another way is to make some controls on dialog invisible initially (without WS_VISIBLE style), and show them later:

myButton.ShowWindow(SW_SHOW);
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform