General information
Category:
Microsoft Foundation Classes
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only