oMenu acts differently in February build

oMenu acts differently in February build

Postby John » Sat Feb 11, 2006 6:05 am

Antonio,

it seems the menu items move a little to the right when there is a submenu attached to it, is this intentionally?

Saludos,

John.
John
 
Posts: 67
Joined: Mon Dec 26, 2005 7:44 am
Location: The Netherlands

Postby Antonio Linares » Sat Feb 11, 2006 9:06 am

John,

It is a side effect caused by a recent change.

Please search for this code in classes\menu.prg and change it as shown:

( /* .f. .and. */ IsWinNT() .and. ! lRoot .and. ! ::lSysMenu ),;
Last edited by Antonio Linares on Sat Feb 11, 2006 5:52 pm, edited 1 time in total.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Sat Feb 11, 2006 11:06 am

This still is not a fix but seems to solve the problem:

Code: Select all  Expand view
METHOD Add( oMenuItem, lRoot ) CLASS TMenu

   DEFAULT lRoot := .f.

   AAdd( ::aItems, oMenuItem )

   oMenuItem:oMenu = Self

   if ValType( oMenuItem:bAction ) == "O" .and. ;
      Upper( oMenuItem:bAction:ClassName() ) == "TMENU"
      if oMenuItem:cPrompt != nil
         AppendMenu( ::hMenu, nOr( MF_POPUP, MF_ENABLED,;
                          If( oMenuItem:hBitmap != 0 .or. ( .f. .and. IsWinNT() .and. ! lRoot .and. !::lSysmenu), MF_OWNERDRAW, 0 ),; //EMG
                          If( oMenuItem:lHelp, MF_HELP, 0 ),;
                          If( oMenuItem:lChecked, MF_CHECKED, 0 ),;
                          If( ! oMenuItem:lActive, MF_GRAYED, 0 ),;
                          If( oMenuItem:lBreak, MF_BREAK, 0 ) ),;
                     oMenuItem:bAction:hMenu,;
                     oMenuItem:cPrompt )
      else
         AppendMenu( ::hMenu, nOR( MF_POPUP, MF_BITMAP,;
                          If( oMenuItem:lChecked, MF_CHECKED, 0 ),;
                          If( ! oMenuItem:lActive, MF_GRAYED, 0 ),;
                          If( oMenuItem:lHelp, MF_HELP, 0 ),;
                          If( oMenuItem:lBreak, MF_BREAK, 0 ) ),;
                     oMenuItem:bAction:hMenu, oMenuItem:hBitmap )
      endif
      AAdd( aPopups, oMenuItem:bAction )
   else
      if oMenuItem:cPrompt != nil
         AppendMenu( ::hMenu,;
                     nOR( If( oMenuItem:lActive,;
                          nOr( MF_ENABLED, If( oMenuItem:hBitmap != 0 .or. ;
                          ( .f. .and. IsWinNT() .and. ! lRoot .and. ! ::lSysMenu ),; //EMG
                          MF_OWNERDRAW, 0 ) ),;
                          nOR( MF_DISABLED, MF_GRAYED ) ),;
                          If( oMenuItem:lChecked, MF_CHECKED, 0 ),;
                          If( oMenuItem:lHelp, MF_HELP, 0 ),;
                          If( oMenuItem:lBreak, MF_BREAK, 0 ) ),;
                     oMenuItem:nId, oMenuItem:cPrompt )
      else
         if oMenuItem:hBitmap != 0
            #ifdef __XPP__
               if oMenuItem:lBreak == nil
                  oMenuItem:lBreak = .f.
               endif
            #endif
            AppendMenu( ::hMenu, nOr( MF_BITMAP,;
                        If( oMenuItem:lBreak, MF_BREAK, 0 ) ),;
                        oMenuItem:nId, oMenuItem:hBitmap )
         else
            AppendMenu( ::hMenu, MF_SEPARATOR, oMenuItem:nId, "" )
         endif
      endif
   endif

return nil


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby John » Sun Feb 12, 2006 6:13 am

Ok, thanks! That solves the problem for now! :-)
John
 
Posts: 67
Joined: Mon Dec 26, 2005 7:44 am
Location: The Netherlands


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 62 guests