Page 1 of 1

Arabic interface

Posted: Wed Mar 08, 2017 11:46 pm
by hmgaams57
Hi all,

I have an application written using hmg extended whose interface is in French. I translate it to hmg 3.4.3
It's more interesting for me because with hmg 3.4.3 I have the ability to use unicode. I have turned the interface into Arabic but I do not know how to display, for example, dropdown menus, browses ..., from right to left. Any help would be welcome. Thank you in advance

Re: Arabic interface

Posted: Thu Mar 09, 2017 1:05 am
by srvet_claudio
Try with:

Code: Select all

#include "hmg.ch"
Function Main
   ...
   HMG_SetLayoutRTL( .T. )  // put at the beginning of the main function, before creating any window
   ...
   Define Window ...
   ....
   ....
Return


#pragma BEGINDUMP
#include <windows.h>
#include "hbapi.h"

HB_FUNC ( HMG_SETLAYOUTRTL ) 
{
   DWORD nDefaultLayout = hb_parl( 1 ) ? LAYOUT_RTL : 0;
   hb_retl( SetProcessDefaultLayout (  nDefaultLayout ) );
}

#pragma ENDDUMP
See: https://msdn.microsoft.com/en-us/globalization/mt691881

Re: Arabic interface

Posted: Thu Mar 09, 2017 1:13 am
by hmgaams57
Thank you very much Claudio. It works like a charm.