Error with PopUp Menu from resources

Post Reply
User avatar
MaxP
Posts: 85
Joined: Thu Jul 12, 2007 2:02 pm
Contact:

Error with PopUp Menu from resources

Post by MaxP »

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

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

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

Re: Error with PopUp Menu from resources

Post by cnavarro »

I will look at this topic and answer you later. Please wait.
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Error with PopUp Menu from resources

Post by cnavarro »

Currently it is not possible to make menus popups with resources. Is it essential for you to use resources in this type of menu?
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
MaxP
Posts: 85
Joined: Thu Jul 12, 2007 2:02 pm
Contact:

Re: Error with PopUp Menu from resources

Post by MaxP »

No,

I'll try to create menus popups from source

Thanks
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Error with PopUp Menu from resources

Post by cnavarro »

Thanks to you.
I will see if it is possible to implement it for the next version.
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Post Reply