REDEFINE SYSMENU Error with 15.05 Build3

REDEFINE SYSMENU Error with 15.05 Build3

Postby Horizon » Sat Jun 13, 2015 7:21 pm

Hi Antonio,

My code is below.

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


it gives an error like below.

Code: Select all  Expand view
  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.04
Horizon
 
Posts: 1297
Joined: Fri May 23, 2008 1:33 pm

Re: REDEFINE SYSMENU Error with 15.05 Build3

Postby cnavarro » Sat Jun 13, 2015 8:35 pm

Try also

Code: Select all  Expand view

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
User avatar
cnavarro
 
Posts: 6515
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: REDEFINE SYSMENU Error with 15.05 Build3

Postby Horizon » Sun Jun 14, 2015 7: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: Select all  Expand view
  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.04
Horizon
 
Posts: 1297
Joined: Fri May 23, 2008 1:33 pm

Re: REDEFINE SYSMENU Error with 15.05 Build3

Postby cnavarro » Sun Jun 14, 2015 7: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: Select all  Expand view

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
User avatar
cnavarro
 
Posts: 6515
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: REDEFINE SYSMENU Error with 15.05 Build3

Postby cnavarro » Sun Jun 14, 2015 6:52 pm

Solved
I speak with Antonio and see how to solve

Code: Select all  Expand view

.../...
   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

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

 


Image
Last edited by cnavarro on Sun Jun 14, 2015 8:13 pm, edited 1 time in total.
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
User avatar
cnavarro
 
Posts: 6515
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: REDEFINE SYSMENU Error with 15.05 Build3

Postby Horizon » Sun Jun 14, 2015 7:27 pm

Thank you Mr. Navarro.

I am waiting.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1297
Joined: Fri May 23, 2008 1:33 pm

Re: REDEFINE SYSMENU Error with 15.05 Build3

Postby Antonio Linares » Mon Jun 15, 2015 6:52 pm

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

thanks!
regards, saludos

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

Re: REDEFINE SYSMENU Error with 15.05 Build3

Postby Horizon » Tue Jun 16, 2015 5: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.04
Horizon
 
Posts: 1297
Joined: Fri May 23, 2008 1:33 pm

Re: REDEFINE SYSMENU Error with 15.05 Build3

Postby cnavarro » Tue Jun 16, 2015 5: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
User avatar
cnavarro
 
Posts: 6515
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: REDEFINE SYSMENU Error with 15.05 Build3

Postby Horizon » Tue Jun 16, 2015 5:50 pm

Hi,

Unfortuanely there is no related error in these log files.

source is the same.

in dialog on init procedure

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

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1297
Joined: Fri May 23, 2008 1:33 pm

Re: REDEFINE SYSMENU Error with 15.05 Build3

Postby cnavarro » Tue Jun 16, 2015 6:11 pm

You can try this example?

Code: Select all  Expand view


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
User avatar
cnavarro
 
Posts: 6515
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: REDEFINE SYSMENU Error with 15.05 Build3

Postby Horizon » Tue Jun 16, 2015 6:59 pm

Hi,

I have added
Code: Select all  Expand view
#include "FiveWin.ch"


I have deleted undefined variable oWnd.
Code: Select all  Expand view
DEFINE  DIALOG oWndChild TITLE cName


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

This error.
Code: Select all  Expand view
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.04
Horizon
 
Posts: 1297
Joined: Fri May 23, 2008 1:33 pm

Re: REDEFINE SYSMENU Error with 15.05 Build3

Postby cnavarro » Tue Jun 16, 2015 7:00 pm

With the example above you've got Error

Finally try this example and click on the button of TBar

thanks

Code: Select all  Expand view


#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
 
Last edited by cnavarro on Tue Jun 16, 2015 7:35 pm, edited 2 times in total.
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
User avatar
cnavarro
 
Posts: 6515
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: REDEFINE SYSMENU Error with 15.05 Build3

Postby Horizon » Tue Jun 16, 2015 7:13 pm

Hi,

I have compiled last example. It works ok
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1297
Joined: Fri May 23, 2008 1:33 pm

Re: REDEFINE SYSMENU Error with 15.05 Build3

Postby Horizon » Tue Jun 16, 2015 8:13 pm

Hi,

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

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1297
Joined: Fri May 23, 2008 1:33 pm

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 30 guests