Error with PopUp Menu from resources

Error with PopUp Menu from resources

Postby MaxP » Mon Nov 04, 2019 4:59 pm

Dear All,

I encountered a problem with PopUp Menu from resources
To check the problem, simply compile testpop2.prg file in the samples folder.

testpop2.prg

Code: Select all  Expand view
// Testing a Popup Menu from resources

#include "FiveWin.ch"

static oWnd

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

function Main()

   DEFINE WINDOW oWnd FROM 2, 2 TO 20, 70 ;
      TITLE "Testing a PopUp Menu from resources"

   SET MESSAGE OF oWnd TO "Testing a Popup Menu from resources" CENTERED

   ACTIVATE WINDOW oWnd ;
      ON CLICK ShowPopup( nRow, nCol )

return nil

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

function ShowPopup( nRow, nCol )

   local oMenu

   DEFINE MENU oMenu POPUP RESOURCE "Test"

   REDEFINE MENUITEM ID 1100 OF oMenu ;
      ACTION MsgInfo( "Hello World!" ) ;
      MESSAGE "First Popup First option"

   REDEFINE MENUITEM ID 120 OF oMenu ;
      ACTION MsgInfo( "Second option" ) ;
      MESSAGE "Second option"

   REDEFINE MENUITEM ID 1210 OF oMenu ;
      ACTION MsgInfo( "First option deepest Popup" ) ;
      MESSAGE "First option deepest Popup"

   REDEFINE MENUITEM ID 130 OF oMenu ;
      ACTION MsgInfo( "Third option" ) ;
      MESSAGE "Third option"

   REDEFINE MENUITEM ID 140 OF oMenu ;
      ACTION oWnd:End() ;
      MESSAGE "End application"

   ACTIVATE POPUP oMenu AT nRow, nCol OF oWnd

return nil

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


testpop2.rc

Code: Select all  Expand view
#include "..\include\WinApi.ch"

Test MENU
BEGIN
   POPUP "&Another"
   BEGIN
      MENUITEM "&One",   1100

      POPUP "&Two"
      BEGIN
         MENUITEM "&Third one",   1210
         MENUITEM "&Third two",   1220
         MENUITEM SEPARATOR
         MENUITEM "&Third three", 1230
      END

      MENUITEM "T&hree", 1300
   END

   MENUITEM "&Two",   120

   MENUITEM "T&hree", 130

   MENUITEM SEPARATOR

   MENUITEM "&End sample", 140
END


Applicazione
===========
Nome e percorso: C:\fwh\samples\TESTPOP2.exe (32 bits)
Dimensioni: 4.406.272 bytes
Versione compilatore: Harbour 3.2.0dev (r1904111533)
Versione FiveWin: FWH 19.09
Versione compilatore C: Borland/Embarcadero C++ 7.0 (32-bit)
Versione Windows: 6.2, Build 9200

Tempo trascorso dall'inizio: 0 hours 0 mins 2 secs
Data in cui è apparso l'errore: 11/04/19, 17:46:50
Descizione errore: Error BASE/1004 No exported method: NMNUWIDTH
Args:
[ 1] = U

Stack Calls
===========
Called from: => NMNUWIDTH( 0 )
Called from: .\source\classes\PDMENU.PRG => FW_MEASUREITEM( 1373 )
Called from: WINDOW.prg => TWINDOW:MEASUREITEM( 1481 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: WINDOW.prg => _FWH( 3565 )
Called from: => TRACKPOPUP( 0 )
Called from: .\source\classes\MENU.PRG => TMENU:ACTIVATE( 1591 )
Called from: TESTPOP2.prg => SHOWPOPUP( 49 )
Called from: TESTPOP2.prg => (b)MAIN( 17 )
Called from: WINDOW.prg => TWINDOW:LBUTTONDOWN( 2073 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: WINDOW.prg => _FWH( 3565 )
Called from: => WINRUN( 0 )
Called from: WINDOW.prg => TWINDOW:ACTIVATE( 1103 )
Called from: TESTPOP2.prg => MAIN( 17 )


Tools used:
Fivewin 19.09
Borland 5.82

Thanks
Massimo
User avatar
MaxP
 
Posts: 85
Joined: Thu Jul 12, 2007 2:02 pm

Re: Error with PopUp Menu from resources

Postby cnavarro » Mon Nov 04, 2019 6:11 pm

I will look at this topic and answer you later. Please wait.
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: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Error with PopUp Menu from resources

Postby cnavarro » Tue Nov 05, 2019 5:33 pm

Currently it is not possible to make menus popups with resources. Is it essential for you to use resources in this type of menu?
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: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Error with PopUp Menu from resources

Postby MaxP » Wed Nov 06, 2019 7:16 am

No,

I'll try to create menus popups from source

Thanks
User avatar
MaxP
 
Posts: 85
Joined: Thu Jul 12, 2007 2:02 pm

Re: Error with PopUp Menu from resources

Postby cnavarro » Wed Nov 06, 2019 9:29 am

Thanks to you.
I will see if it is possible to implement it for the next version.
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: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España


Return to FiveWin for Harbour/xHarbour

Who is online

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