Solved

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

Posted on 2000-05-01
1
259 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Named range not carried over 10 63
sumHeights  challenge 17 71
Unix Command -- Challenging  question 7 92
Change to event 1 115
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.

825 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