Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rich Edit control EM_SETTEXTMODE not working

Status
Not open for further replies.

wduty

Programmer
Jun 24, 2000
271
US
Rich Edit control works ok but doesn't allow setting of TF_PLAINTEXT:

Code:
SendMessage(mhEditCtrl, EM_SETTEXTMODE, TM_PLAINTEXT, 0);

returns 0 which is supposed to indicate success according to the api docs. But it's not plain text because I can drag formatted text (with various fonts etc) into the control. And checking the format after setting seems to show it's still in TM_RICHTEXT mode:

Code:
testval = SendMessage(mhEditCtrl, EM_GETTEXTMODE, 0, 0); 
if(testval & TM_RICHTEXT) //returns true.

any suggestions?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top