Bug in 2007 menu and MDI

Bug in 2007 menu and MDI

Postby Enrico Maria Giordano » Tue Nov 27, 2007 9:32 am

In the following sample, please:

- press ALT-1 and the system menu will popup instead of Changed1 menu

- then press ALT and the MDICHILD icon will disappear

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


FUNCTION MAIN()

    LOCAL oWnd, oMenu

    MENU oMenu 2007
        MENUITEM "Test&1"
        MENUITEM "Test&2"
        MENUITEM "Test&3"
    ENDMENU

    DEFINE WINDOW oWnd MDI;
           TITLE "MDI Test";
           MENU oMenu

    ACTIVATE WINDOW oWnd;
             ON INIT CREATECHILD( oWnd )

    RETURN NIL


STATIC FUNCTION CREATECHILD( oMdi )

    LOCAL oWnd, oMenu

    MENU oMenu 2007
        MENUITEM "Changed&1"
        MENUITEM "Changed&2"
        MENUITEM "Changed&3"
    ENDMENU

    DEFINE WINDOW oWnd MDICHILD OF oMdi;
           TITLE "MDI Child Test";
           MENU oMenu

    ACTIVATE WINDOW oWnd;
             VALID !GETKEYSTATE( VK_ESCAPE );
             MAXIMIZED

    RETURN NIL


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

Postby Antonio Linares » Wed Nov 28, 2007 8:28 am

Enrico,

If the mdichild is not maximized then it works fine.

It looks as a Windows bug when using all menuitems as ownerdraw, as FWH does not change the way the menu commands are processed :-(

The erase of the icon is our fault as we paint the entire horizontal bar. We need to check if a mdichild is maximized and then don't paint in that area
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
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 70 guests