TMenu and checked items

TMenu and checked items

Postby Enrico Maria Giordano » Mon Feb 06, 2006 9:37 am

The following sample shows an unpleasant inset effect in checked menu items:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oWnd

    DEFINE WINDOW oWnd;
           MENU BUILDMENU()

    ACTIVATE WINDOW oWnd

    RETURN NIL


STATIC FUNCTION BUILDMENU()

    LOCAL oMenu

    MENU oMenu
        MENUITEM "Test"

        MENU
            MENUITEM "Test1" ACTION MSGINFO( "Test1" ) CHECKED
            SEPARATOR
            MENUITEM "Test2" ACTION MSGINFO( "Test2" )
        ENDMENU
    ENDMENU

    RETURN oMenu


This is not a fix but with the following change in Add method (I just add a .f.) the effect vanishes:

Code: Select all  Expand view
   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 ),;
                          MF_OWNERDRAW, 0 ) ),;


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

Postby Antonio Linares » Tue Feb 07, 2006 10:42 am

Enrico,

Many thanks!

Will you mind to email me menu.prg to be sure we have the same code ? thanks.
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



Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 64 guests

cron