Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2000-05-01
1
Medium Priority
?
278 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
V_Bapat earned 60 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

609 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