Solved

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

Posted on 2000-05-01
1
254 Views
Last Modified: 2013-11-20
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
Comment
Question by:nkhbeik
1 Comment
 
LVL 3

Accepted Solution

by:
V_Bapat earned 20 total points
ID: 2768384
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Adapt this command to show who installed 29 102
notReplace  challenge 53 102
fizzArray  challenge 1 49
Window placement 17 65
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now