I click on a dialog I must open a popup with a menu
but How I can open it on row,col where I click with the mouse ?
any sample please
..
..
oDlg:bRClicked = { | nRow, nCol, nFlags | ShowPopup( oDlg, nRow, nCol ) }
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
//-------------------------------------------------------------//
FUNCTION SHOWPOPUP(oDlg,nRow,nCOL)
local oMenu
MENU oMenu POPUP
MENUITEM RESOURCE "Help"
MENU
MENUITEM RESOURCE "Help" MESSAGE " Test " ;
ACTION ( CURSORWAIT(), FUNCTION1(), SYSREFRESH() )
SEPARATOR
MENUITEM RESOURCE "Help" MESSAGE " Test" ;
ACTION ( CURSORWAIT(), FUNCTION2(), SYSREFRESH() )
SEPARATOR
ENDMENU
ENDMENU
ACTIVATE POPUP oMenu OF oDlg AT nRow, nCol
RETURN( NIL )
..
..
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON CLICK SHOWPOPUP1(oWnd,nRow,nCOL,hDC)
//-------------------------------------------------------------//
FUNCTION SHOWPOPUP1(oWnd,nRow,nCOL,hDC)
local oMenu
MENU oMenu POPUP
MENUITEM RESOURCE "Help"
MENU
MENUITEM RESOURCE "Help" MESSAGE " Test " ;
ACTION ( CURSORWAIT(), FUNCTION1(), SYSREFRESH() )
SEPARATOR
MENUITEM RESOURCE "Help" MESSAGE " Test" ;
ACTION ( CURSORWAIT(), FUNCTION2(), SYSREFRESH() )
SEPARATOR
ENDMENU
ENDMENU
ACTIVATE POPUP oMenu1 AT nRow, nCol OF oWnd
RETURN( NIL )
FUNCTION SHOWPOPUP1(oDlg,nRow,nCOL)
local oMenu
MENU oMenu POPUP
MENUITEM "&Main" RESOURCE "Help"
MENU
MENUITEM oMain1 PROMPT "Main 1" RESOURCE "Help"
MENU
MENUITEM oSub1 PROMPT "Sub Main 1a" RESOURCE "Help" MESSAGE " Test 1" ;
ACTION ( CURSORWAIT(), FUNCTION1(), SYSREFRESH() )
MENUITEM oSub2 PROMPT "Sub Main 1b" RESOURCE "Help" MESSAGE " Test 2" ;
ACTION ( CURSORWAIT(), FUNCTION2(), SYSREFRESH() )
MENUITEM oSub3 PROMPT "Sub Main 1c" RESOURCE "Help" MESSAGE " Test 3" ;
ACTION ( CURSORWAIT(), FUNCTION3(), SYSREFRESH() )
ENDMENU
SEPARATOR
MENUITEM oMain2 PROMPT "Main 2" RESOURCE "Help" MESSAGE " Test" ;
ACTION ( CURSORWAIT(), FUNCTION4(), SYSREFRESH() )
MENUITEM oMain3 PROMPT "Main 3" RESOURCE "Help" MESSAGE " Test" ;
ACTION ( CURSORWAIT(), FUNCTION5(), SYSREFRESH() )
MENUITEM oMain4 PROMPT "Main 4" RESOURCE "Help" MESSAGE " Test" ;
ACTION ( CURSORWAIT(), FUNCTION6(), SYSREFRESH() )
ENDMENU
ENDMENU
ACTIVATE POPUP oMenu OF oDlg AT nRow, nCol
RETURN( NIL )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 92 guests