Click here to Skip to main content
15,888,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
how to set default values to the edit control box in vc++ MFC?(without using mask edit control)
Posted

The answer given above is good, but if you want to use the value from edit control or you need to get the edited value from the edit control. It is better to add a variable for that edit control using class wizard. And by using this variable you can Get and Set the value of edit control using UpdataData() function call.
 
Share this answer
 
Comments
Aescleal 12-Jun-12 10:19am    
Gave you a 4 as you didn't mention the DDX functions which are the reason UpdateData works.
Binu MD 12-Jun-12 19:52pm    
If you are using visual studio class wizard to add variable, DDX functions are automatically generated by class wizard. If you are not using class wizard you need to add it manually.
You can use SetWindowText(). Place the SetWindowText() in OnInitDialog().

Thanks,
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900