Page 1 of 1
Menus
Posted: Tue Jan 24, 2006 5:54 pm
by Enrico Maria Giordano
Is it possible to create submenus and how?
EMG
Posted: Tue Jan 24, 2006 6:26 pm
by Antonio Linares
Enrico,
Do you mean POPUP menus ?
Posted: Tue Jan 24, 2006 7:04 pm
by Enrico Maria Giordano
No, the menu on the bottom bar. The FWPPC samples show how to get a bar menu with two items. What I would like to do is to open a submenu for each of those items. Is it possible?
EMG
Posted: Thu Jan 26, 2006 7:00 am
by Eugeniusz Owsiak
Enrico, this works for me ( I know it's a POPUP menu):
in .RC file (from eVC++) :
102 MENU DISCARDABLE
BEGIN
POPUP "Obsługa"
BEGIN
MENUITEM "Łączenie", 100
MENUITEM "Logowanie", 102
MENUITEM "Maszyna", 104
MENUITEM "Przegląd", 106
END
POPUP "Help"
BEGIN
MENUITEM "Test", 200
MENUITEM "Test 1", 202
END
END
in .PRG file
function BuildMenu()
local oMenu
DEFINE MENU oMenu RESOURCE 102
REDEFINE MENUITEM ID 100 OF oMenu ACTION Lacz()
REDEFINE MENUITEM ID 102 OF oMenu ACTION (iif(lConnect,Loguj(),msgInfo("Brak połączenia z serwerem")))
REDEFINE MENUITEM ID 104 OF oMenu ACTION (iif(lLogin,Wybor(),msgInfo("Najpier się zaloguj")))
REDEFINE MENUITEM ID 106 OF oMenu ACTION (iif(lLogin,Wodzik(),msgInfo("Najpier się zaloguj")))
REDEFINE MENUITEM ID 200 OF oMenu ACTION Help()
REDEFINE MENUITEM ID 202 OF oMeneu ACTION Help1()
return oMenu
regards Eugeniusz
Posted: Thu Jan 26, 2006 8:25 am
by Enrico Maria Giordano
Thank you, I'll give it a try.
EMG
Posted: Thu Jan 26, 2006 12:24 pm
by Enrico Maria Giordano
Unfortunately it doesn't seem to work. Can you send me a reduced and self-contained working sample, please?
EMG
Posted: Thu Jan 26, 2006 12:45 pm
by Eugeniusz Owsiak
Check your mail
Eugeniusz
Posted: Thu Jan 26, 2006 1:37 pm
by Enrico Maria Giordano
It works, thank you!
EMG