[loc] fix license display for RTL languages

This commit is contained in:
Pete Batard 2016-12-05 10:52:37 +00:00
parent 8128d34e35
commit 4891500f40
2 changed files with 15 additions and 5 deletions

View file

@ -562,10 +562,20 @@ void ResizeMoveCtrl(HWND hDlg, HWND hCtrl, int dx, int dy, int dw, int dh, float
*/
INT_PTR CALLBACK LicenseCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
long style;
HWND hLicense;
switch (message) {
case WM_INITDIALOG:
hLicense = GetDlgItem(hDlg, IDC_LICENSE_TEXT);
apply_localization(IDD_LICENSE, hDlg);
CenterDialog(hDlg);
// Suppress any inherited RTL flags
style = GetWindowLong(hLicense, GWL_EXSTYLE);
style &= ~(WS_EX_RTLREADING | WS_EX_RIGHT | WS_EX_LEFTSCROLLBAR);
SetWindowLong(hLicense, GWL_EXSTYLE, style);
style = GetWindowLong(hLicense, GWL_STYLE);
style &= ~(ES_RIGHT);
SetWindowLong(hLicense, GWL_STYLE, style);
SetDlgItemTextA(hDlg, IDC_LICENSE_TEXT, gplv3);
break;
case WM_COMMAND: