Suppose I have a edit control in my dialog .Now I want to change it into check control or any other at runtime.Is it possible?
If yes then how
Printable View
Suppose I have a edit control in my dialog .Now I want to change it into check control or any other at runtime.Is it possible?
If yes then how
Easiest way is just to hide the old one, and display a new control instead (create them both at the start if you want, or just keep creating/destroying them).
The controls can't just "morph" into a new type, they have to be created specifically somehow.
You'll have to do like Parskie said. Although, if you have created a button (of class "BUTTON"), you can change it to a checkbox, radio button, or a frame by changing its style using SetWindowLong accordingly.