I have seen several similar question on this subject but I can seem to resolve it.
For example, on CodeProject:
https://www.codeproject.com/Messages/2873837/Re-How-to-set-RTL-layout-for-a-CPropertySheet.aspx
And on SO:
RTL layout issue for Property Sheets (MFC)
So, I have a CMFCPropertySheet that is my main application window and it is set to Arabic when the program starts:
The problem, as it the case for other users, is that whilst the pages are correctly set to RTL layout the sheet is not.
What is the correct way to get the sheet itself to display RTL?
I tried to use PreCreateWindow and it made no difference. I tried to use SetProcessDefaultLayout too. No joy.

Ideally, the window style should be changed in
OnNcCreatebefore the window starts creating and positioning its child controls. This way, the child tab, as well as child buttons, will be positioned accordingly (OK/Cancel/Apply button will be aligned to the left side as well).Example:
Alternatively, do this in
OnInitDialog, use::FindWindowEx(m_hWnd, 0, WC_TABCONTROL, 0)to find tab control's handle and change its style. This way the buttons are not re-positioned. Example:Side note:
You can also call
SetProcessDefaultLayout(LAYOUT_RTL)at the start of the process (for example inCMyWinApp::InitInstance). Then change the layout depending on the result fromGetProcessDefaultLayout. So you remember not to accidentally change the style for the Latin version...