Right-justified Windows and Menus in Hebrew Win95

Last reviewed: January 15, 1998
Article ID: Q152137
4.00    | 3.51
WINDOWS | WINDOWS NT kbprg

The information in this article applies to:

  • Microsoft Win32 Software Development Kit for

         - Microsoft Windows 95, version 4.0
         - Microsoft Windows NT, version 3.51
    

SUMMARY

The written languages and cultures of the Middle East have a general right- to-left orientation while Latin-based written languages and cultures have a left-to-right orientation. This means that in a Hebrew application, lists, menus, sets of buttons, or anything else that can have an alignment should be designed with a right-to-left orientation.

MORE INFORMATION

Under Hebrew Windows 95, you can create overlapped windows, edit controls, list boxes, and so on, that have a right-to-left orientation by calling CreateWindowEx(WS_EX_RIGHT...). When the resulting window is opened in Hebrew Windows 95, if a caption bar exists for that window, it is right- aligned. If the resulting window is a control, the control would also have a right-aligned property. For example, edit controls would have cursors that start from the right end of the client area.

To right-align the menu takes a bit more work. The MENUEX resource and the MFT_RIGHTJUSTIFY flag will need to be used.

The syntax for MENUEX is:

   menuID MENUEX
   BEGIN
       [{[MENUITEM itemText [, [id] [, [type] [, state]]]] |
       [POPUP    itemText [, [id] [, [type] [, [state] [, helpID]]]]
       BEGIN
           popupBody
       END]} ...]
   END

   The following is an example of a right justified menu:
   ...
   #include "winuser.h"
   ...

   GENERIC MENUEX DISCARDABLE
   BEGIN
       POPUP "&File", , MFT_RIGHTJUSTIFY
       BEGIN
           MENUITEM "&New",     IDM_NEW, MFS_GRAYED
           MENUITEM "&Open...", IDM_OPEN, MFS_GRAYED
           MENUITEM "&Save",    IDM_SAVE, MFS_GRAYED
           MENUITEM "E&xit",    IDM_EXIT
       END
       POPUP "&Edit", , MFT_RIGHTJUSTIFY
       BEGIN
           MENUITEM "Cu&t\tCtrl+X",   IDM_CUT, MFS_GRAYED
           MENUITEM "&Copy\tCtrl+C",  IDM_COPY,MFS_GRAYED
           MENUITEM "&Paste\tCtrl+V", IDM_PASTE, MFS_GRAYED
           MENUITEM "Paste &Link",    IDM_LINK, MFS_GRAYED
       END

   END

SetMenuItemInfo can also be used to set the MFT_RIGHTJUSTIFY flag for individual menu items.


Additional reference words: 3.51 4.00 ME Arabic
KBCategory: kbprg
KBSubcategory: KBIntlDev
95 available. Arabic Windows 95 is still in beta.
Keywords : KBIntlDev kbprg
Version : 4.00 | 3.51
Platform : NT WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 15, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.