Print Page | Close Window

remove WS_EX_LAYOUTRTL ?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=8973
Printed Date: 14 November 2025 at 8:09am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: remove WS_EX_LAYOUTRTL ?
Posted By: omid
Subject: remove WS_EX_LAYOUTRTL ?
Date Posted: 30 November 2007 at 4:38pm

Hi .

Can anyone help me to remove WS_EX_LAYOUTRTL from an editcontrol dynamically at runtime?

I have an editcontrol in my mfc dialog from  that can change  it's layouts  to  RTL(right to left mirror ) at run time but tired to remove this ExStyle and return it to LTR layout . . .

 

here is the code :

 

if(isRTL)

{

GetDlgItem(IDC_ENFA_TEXT)->ModifyStyleEx(0,WS_EX_LAYOUTRTL);

GetDlgItem(IDC_ENFA_TEXT)->SetFocus();

}

else

{

 

GetDlgItem(IDC_ENFA_TEXT)->ModifyStyleEx(WS_EX_LAYOUTRTL,0);

//GetDlgItem(IDC_ENFA_TEXT)->ModifyStyleEx(WS_EX_LAYOUTRTL,0,SWP_FRAMECHANGED);

//RedrawWindow(NULL,NULL,RDW_INVALIDATE | RDW_UPDATENOW |RDW_ERASE|RDW_ALLCHILDREN);

GetDlgItem(IDC_ENFA_TEXT)->SetFocus();

}

UpdateWindow();




Replies:
Posted By: Oleg
Date Posted: 01 December 2007 at 3:00am
Hi,
 
Never add WS_EX_LAYOUTRTL for edit control - it doesn't support it.
 
Use these flags :
WS_EX_RIGHT | WS_EX_LEFTSCROLLBAR | WS_EX_RTLREADING


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: omid
Date Posted: 02 December 2007 at 5:27am

yes , also use SetWindowLong and it work .

thanks .



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net