ysun
asked on
Modification of window style parameters in MS Visual C++
When a dialogue window, such as a button or an edit box, is created, many of its styles can be set by corresponding edit tools at beginning. My question is how to change those styles in program.
In use of MS Visual C++ V4.x, there are a lot of parameters which can be found in the .rc file, Can they be changed via some functions?
For example, there is a text edit box with an ID of "IDC_TEXT_EDIT" and a style of "ES_READONLY". One line in the .rc file looks like:
EDITTEXT IDC_TEXT_EDIT,110,30,15,12 ,ES_UPPERC ASE|ES_REA DONLY
Can I set those parameters for their application window just like to set ES_READONLY off or on for a text edit box?
In use of MS Visual C++ V4.x, there are a lot of parameters which can be found in the .rc file, Can they be changed via some functions?
For example, there is a text edit box with an ID of "IDC_TEXT_EDIT" and a style of "ES_READONLY". One line in the .rc file looks like:
EDITTEXT IDC_TEXT_EDIT,110,30,15,12
Can I set those parameters for their application window just like to set ES_READONLY off or on for a text edit box?
ysun,
Take a look at the member functions for the object you are trying to set the window styles of. For example in CEdit there is a member function: SetReadOnly that will change this style.
Take a look at the member functions for the object you are trying to set the window styles of. For example in CEdit there is a member function: SetReadOnly that will change this style.
ASKER
I know that the SetReadOnly() is a member function of CEdit
and it can change the read-only style.I hope to know how to realized this. That is how to define the object with a "IDC_TEXT_EDIT" ID as CEdit.
and it can change the read-only style.I hope to know how to realized this. That is how to define the object with a "IDC_TEXT_EDIT" ID as CEdit.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER