FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour REDEFINE SYSMENU Error with 15.05 Build3
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
REDEFINE SYSMENU Error with 15.05 Build3
Posted: Sat Jun 13, 2015 07:21 PM
Hi Antonio,

My code is below.

Code (fw): Select all Collapse
REDEFINE SYSMENU oMenu OF oDlg
     MENUITEM "Çerçe&ve Kaydet" ACTION ::Cerceve_Kaydet(1)
ENDMENU


it gives an error like below.

Code (fw): Select all Collapse
   Error occurred at: 13/06/2015, 21:51:40
   Error description: Error BASE/1066  Argument error: conditional
   Args:
     [   1] = U   

Stack Calls
===========
   Called from: .\source\classes\PDMENU.PRG => MENUBEGIN( 95 )
   Called from: .\TOb_Browse1.prg => TYK_LIST:YK_LIST_ONINIT( 901 )


I think lMenuBar is not defined .t. or .f. in NewSys of TMenu Method.

I dont know where to initialize it?

Can you help me?
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: REDEFINE SYSMENU Error with 15.05 Build3
Posted: Sat Jun 13, 2015 08:35 PM
Try also

Code (fw): Select all Collapse
METHOD NewSys( oWnd ) CLASS TMenu
   local n

   local lPopup       := .F., ;
           l2007      := .F., ;
           l2010      := .F., ;
           l2013      := .F., ;
           l2015      := .F., ;
           lUnicode   := .F., ;
           lMenuBar   := .F., ;
           lLinV      := .F., ;
           lColors    := .F., ;
           nClrMenu   := GetSysColor( COLOR_MENU ), ;          //menus fondo
           nClrMenutxt:= GetSysColor( COLOR_MENUTEXT ) ,;      //menus texto
           nClrToBa   := GetSysColor( COLOR_BTNFACE ),;        //menus bmps fondo degrade final
           nClrBkBa   := GetSysColor( COLOR_BTNHIGHLIGHT ) , ; //menus bmps fondo degrade inicio
           nClrHiLi   := GetSysColor( COLOR_HIGHLIGHTTEXT ), ; //seleccion menu inicio
           nClrHiLf   := GetSysColor( COLOR_HIGHLIGHT ), ;     //seleccion menu final
           nClrHitx   := GetSysColor( COLOR_MENUTEXT ),; //HIGHLIGHTTEXT ) ,; //seleccion texto menu
           nClrHiBr   := GetSysColor( COLOR_ACTIVEBORDER )    //bordes menus

   ::nClrMenu   := nClrMenu
   ::nClrText   := nClrMenutxt
   ::nClrBkBa   := nClrBkBa
   ::nClrToBa   := nClrToBa
   ::nClrHiLi   := nClrHiLi
   ::nClrHiLf   := nClrHiLf
   ::nClrHitx   := nClrHitx
   ::nClrHiBr   := nClrHiBr
   ::lLinVert   := lLinV

   ::l2007      := l2007
   ::l2010      := l2010
   ::l2013      := l2013
   ::l2015      := l2015

   ::lColors    := lColors
   ::lMenuBar   := lMenuBar

   if oWnd != nil
      ::oWnd    := oWnd
      ::hMenu   := GetSystemMenu( oWnd:hWnd, .f. )
   endif
   ::aMenuItems := {}
   ::lSysMenu   := .T.
   ::nLevel     := ++::nAUxlevel
   ::lPopup     := .F.

return Self
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: REDEFINE SYSMENU Error with 15.05 Build3
Posted: Sun Jun 14, 2015 07:11 AM
Hi

the above problem is solved. But When I try to open sysmenu with left click, the below error message is occurred.

Code (fw): Select all Collapse
   Time from start: 0 hours 0 mins 15 secs 
   Error occurred at: 14/06/2015, 10:06:17
   Error description: Error BASE/1004  No exported method: GETMENUITEM
   Args:
     [   1] = U   
     [   2] = N   61456

Stack Calls
===========
   Called from:  => GETMENUITEM( 0 )
   Called from: .\source\classes\WINDOW.PRG => TDIALOG:MEASUREITEM( 1489 )
   Called from:  => TWINDOW:HANDLEEVENT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 909 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 289 )
   Called from: .\TOb_Browse1.prg => TYK_LIST:NEW( 473 )
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: REDEFINE SYSMENU Error with 15.05 Build3
Posted: Sun Jun 14, 2015 07:34 AM
You can put a small example to check the error?

1.- You want to put a SYSMENU in a dialogue?

2.- Try, and tell me the result
Code (fw): Select all Collapse
REDEFINE SYSMENU oDlg:oSysMenu OF oDlg
     MENUITEM "Çerçe&ve Kaydet" ACTION ::Cerceve_Kaydet(1)
ENDMENU
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: REDEFINE SYSMENU Error with 15.05 Build3
Posted: Sun Jun 14, 2015 06:52 PM
Solved
I speak with Antonio and see how to solve

Code (fw): Select all Collapse
.../...
   ACTIVATE DIALOG oDlg ON INIT ( MenuDlg( oDlg ) )

return nil
//----------------------------------------------------------------------------//
Function MenuDlg( oWnd )
Local oMenu

   REDEFINE SYSMENU oMenu OF oWnd
     SEPARATOR
     MENUITEM "Primer Item" ACTION MsgInfo( "Hola" ) CHARICON 57605
   ENDSYSMENU

Return oMenu

//----------------------------------------------------------------------------//


Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: REDEFINE SYSMENU Error with 15.05 Build3
Posted: Sun Jun 14, 2015 07:27 PM

Thank you Mr. Navarro.

I am waiting.

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: REDEFINE SYSMENU Error with 15.05 Build3
Posted: Mon Jun 15, 2015 06:52 PM

We are going to include these changes in FWH 15.05 build 4

thanks!

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: REDEFINE SYSMENU Error with 15.05 Build3
Posted: Tue Jun 16, 2015 05:34 PM

Hi,

I have tried the build 4.

I have builded all my obj file and created my exe. I run my exe. When I try to click sysmenu there was no menu and not responding error after a minute. When I try to close my exe, W7 has gived the blue screen error and restart the my computer.

back to 15.03 again. (I have not tried 15.04, because I did not download it)

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: REDEFINE SYSMENU Error with 15.05 Build3
Posted: Tue Jun 16, 2015 05:40 PM

You can put the error.log or hb_out.log?
And the source code?

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: REDEFINE SYSMENU Error with 15.05 Build3
Posted: Tue Jun 16, 2015 05:50 PM
Hi,

Unfortuanely there is no related error in these log files.

source is the same.

in dialog on init procedure

Code (fw): Select all Collapse
REDEFINE SYSMENU oMenu OF oDlg
     MENUITEM "Çerçe&ve Kaydet" ACTION ::Cerceve_Kaydet(1)
ENDMENU
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: REDEFINE SYSMENU Error with 15.05 Build3
Posted: Tue Jun 16, 2015 06:11 PM
You can try this example?

Code (fw): Select all Collapse
function Main()

   local oWndChild, oDlg, oBtn
   local cName := "Testing..."
   LOCAl oBar
   Local oMenu
   Local oFontMenu

   DEFINE FONT oFontMenu NAME "Tahoma" SIZE 0, -12

   DEFINE  DIALOG oWndChild OF oWnd TITLE cName ;
      FROM 110, 1 TO 400, 800 PIXEL 

   oWndChild:SetFont( oFontMenu )

   ACTIVATE DIALOG oWndChild ON INIT MenuDlg( oWndChild ) 


return nil

//----------------------------------------------------------------------------//

Function MenuDlg( oWnd )
Local oMenu

   REDEFINE SYSMENU oMenu OF oWnd
     SEPARATOR
     MENUITEM "Primer Item" ACTION MsgInfo( Len( oWnd:oSysMenu:aMenuitems ) ) //CHARICON 57605
   ENDSYSMENU

Return oMenu
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: REDEFINE SYSMENU Error with 15.05 Build3
Posted: Tue Jun 16, 2015 06:59 PM
Hi,

I have added
Code (fw): Select all Collapse
#include "FiveWin.ch"


I have deleted undefined variable oWnd.
Code (fw): Select all Collapse
DEFINE  DIALOG oWndChild TITLE cName


I have compiled the sample.prg with buildh32.bat.

This error.
Code (fw): Select all Collapse
Application
===========
   Path and name: D:\fwh\samples\cnav1.exe (32 bits)
   Size: 3,168,256 bytes
   Compiler version: Harbour 3.2.0dev (r1412151448)
   FiveWin  Version: FWH 15.05
   Windows version: 6.1, Build 7601 Service Pack 1

   Time from start: 0 hours 0 mins 0 secs 
   Error occurred at: 06/16/15, 21:52:23
   Error description: Error BASE/1004  No exported method: OMENU
   Args:
     [   1] = U   

Stack Calls
===========
   Called from:  => OMENU( 0 )
   Called from: .\source\classes\MENU.PRG => TMENU:NEWSYS( 402 )
   Called from: .\source\classes\PDMENU.PRG => MENUBEGIN( 53 )
   Called from: cnav1.prg => MENUDLG( 28 )
   Called from: cnav1.prg => (b)MAIN( 18 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 703 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 893 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 289 )
   Called from: cnav1.prg => MAIN( 18 )

System
======
   CPU type: Intel(R) Core(TM) i5 CPU       M 480  @ 2.67GHz 75 Mhz
   Hardware memory: 7990 megs

   Free System resources: 90 %
        GDI    resources: 90 %
        User   resources: 90 %

   Windows total applications running: 7
      1 ,                                                                                                     
      2 , C:\Windows\syswow64\SHELL32.dll                                                                     
      3 , C:\Windows\syswow64\SHLWAPI.dll                                                                     
      4 , D:\fwh\samples\cnav1.exe                                                                            
      5 DDE Server Window, C:\Windows\syswow64\ole32.dll                                                                       
      6 GDI+ Window, C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.18834_none_72d38c5186679d 
      7 TouchPad object helper window, C:\Program Files (x86)\DigitalPersona\Bin\DpoFeedb.dll                                              

Variables in use
================
   Procedure     Type   Value
   ==========================
   OMENU
     Param   1:    O    Class: ERROR
   TMENU:NEWSYS
     Local   1:    U    
     Local   2:    U    
   MENUBEGIN
     Param   1:    O    Class: TDIALOG
     Local   1:    U    
   MENUDLG
     Param   1:    L    .F.
     Param   2:    L    .T.
     Param   3:    O    Class: TDIALOG
     Local   1:    L    .F.
     Local   2:    L    .F.
     Local   3:    U    
     Local   4:    U    
     Local   5:    U    
     Local   6:    U    
     Local   7:    U    
     Local   8:    U    
     Local   9:    U    
     Local  10:    U    
     Local  11:    U    
     Local  12:    U    
     Local  13:    U    
     Local  14:    L    .F.
     Local  15:    L    .F.
     Local  16:    L    .F.
     Local  17:    L    .F.
     Local  18:    U    
     Local  19:    U    
     Local  20:    U    
     Local  21:    U    
     Local  22:    U    
     Local  23:    U    
   (b)MAIN
     Param   1:    O    Class: TDIALOG
     Local   1:    U    
   TDIALOG:INITIATE
     Param   1:    O    Class: TDIALOG
   TDIALOG:HANDLEEVENT
     Param   1:    N    331150
     Param   2:    N    331150
     Local   1:    L    .T.
     Local   2:    U    
     Local   3:    U    
     Local   4:    L    .F.
     Local   5:    U    
     Local   6:    U    
   DIALOGBOXINDIRECT
     Param   1:    N    272
     Param   2:    N    331150
     Param   3:    N    331150
   TDIALOG:ACTIVATE
     Param   1:    N    20643840
     Param   2:    C    "€ È€        7 ‘’     T e s t i n g . . .   "
     Param   3:    N    0
     Param   4:    O    Class: TDIALOG
   MAIN
     Param   1:    U    
     Param   2:    U    
     Param   3:    U    
     Param   4:    L    .F.
     Param   5:    U    
     Param   6:    L    .T.
     Param   7:    B    {|| ... }
     Param   8:    U    
     Param   9:    U    
     Param  10:    U    
     Param  11:    U    
     Local   1:    N    0
     Local   2:    S    
     Local   3:    O    Class: TDIALOG

Linked RDDs
===========
   DBF
   DBFFPT
   DBFBLOB
   DBFNTX

DataBases in use
================

Classes in use:
===============
     1 ERROR
     2 HBCLASS
     3 HBOBJECT
     4 TFONT
     5 TWINDOW
     6 TDIALOG
     7 TBRUSH
     8 TMENU
     9 TREG32

Memory Analysis
===============
      324 Static variables

   Dynamic memory consume:
      Actual  Value:          0 bytes
      Highest Value:          0 bytes

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: REDEFINE SYSMENU Error with 15.05 Build3
Posted: Tue Jun 16, 2015 07:00 PM
With the example above you've got Error

Finally try this example and click on the button of TBar

thanks

Code (fw): Select all Collapse
#include "fivewin.ch"

static oWndPrin

function Main()
Local cTitle
Local oBar

   DEFINE WINDOW oWndPrin FROM 3, 6 TO 20, 70 ; //MDI ;
      TITLE "Prueba Menus" MENU MBuildMenu()

   DEFINE BUTTONBAR oBar SIZE 26, 26 OF oWndPrin

   DEFINE BUTTON OF oBar TRANSPARENT GROUP ;
      TOOLTIP "Open" NOBORDER  ACTION Child1( oWndPrin )

   ACTIVATE WINDOW oWndPrin MAXIMIZED

Return nil

Function Child1( oWnd )
   local oWndChild, oDlg, oBtn
   local cName := "Testing..."
   LOCAl oBar
   Local oMenu
   Local oFontMenu

   DEFINE FONT oFontMenu NAME "Tahoma" SIZE 0, -12

   DEFINE  DIALOG oWndChild OF oWnd TITLE cName ;
      FROM 110, 1 TO 400, 800 PIXEL 

   oWndChild:SetFont( oFontMenu )

   ACTIVATE DIALOG oWndChild  ON INIT ( MenuDlg( oWndChild ) )


return nil

//----------------------------------------------------------------------------//

Function MenuDlg( oWnd )
Local oMenu

   REDEFINE SYSMENU oMenu OF oWnd
     SEPARATOR
     MENUITEM "Primer Item" ACTION MsgInfo( Len( oWnd:oSysMenu:aMenuitems ) ) //CHARICON 57605
   ENDSYSMENU

Return oMenu

 function MBuildMenu()

   local oMenu
   local oMruConnections

   MENU oMenu //2007
      MENUITEM FWString( "Databases" )
      MENU
         MENUITEM FWString( "New" ) + "..." 
         MENUITEM FWString( "Open" ) + "..."
         MENUITEM FWString( "Recent files" )

         SEPARATOR

         MENUITEM FWString( "ADO open" ) + "..." 

         MENUITEM FWString( "Recent ADO connections" )

         SEPARATOR

         MENUITEM FWString( "Preferences" ) + "..."

         SEPARATOR

         MENUITEM FWString( "Exit" ) ACTION oWndPrin:End()
      ENDMENU

      oMenu:AddHelp( "Prueba de Menus", "(c) FiveTech Software 2015" )
   ENDMENU

return oMenu
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: REDEFINE SYSMENU Error with 15.05 Build3
Posted: Tue Jun 16, 2015 07:13 PM

Hi,

I have compiled last example. It works ok

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: REDEFINE SYSMENU Error with 15.05 Build3
Posted: Tue Jun 16, 2015 08:13 PM

Hi,

I have tried my application again and two times blue screen.

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06