• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 282
  • Last Modified:

Changing the Style of an Edit Control in Run-time!

The application is a MFC dialog based one. In run-time, I need to change the style of an edit control from ES_LEFT to ES_CENTER! What function should I use to do it?
Thank you!
Jim
0
nkhbeik
Asked:
nkhbeik
1 Solution
 
V_BapatCommented:
According to MSDN, "After the edit control has been created, these styles cannot be modified."

But, some of the edit control styles can be modified after creation. These are:
1. ES_LOWERCASE, ES_NUMBER, ES_OEMCONVERT, ES_UPPERCASE and ES_WANTRETURN styles which can be changed using SetWindowLong(),
2. for ES_PASSWORD use the EM_SETPASSWORDCHAR message and
3. for ES_READONLY use EM_SETREADONLY message.


Vicky
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now