Page 1 of 2

create menu at runtime with HMG

Posted: Fri Apr 06, 2012 12:01 am
by jairpinho
need to create menu at runtime with HMG using dbf mysql or if someone has an example of how to do this with HMG please post an example

[u]Moderator Notes[/u] (Pablo César) wrote:Topic moved from Forum en Español.

Re: create menu at runtime with HMG

Posted: Fri Apr 06, 2012 5:13 am
by mol
you can create it using code like this one:

Code: Select all

		DEFINE MAIN MENU OF OknoGlowne
			DEFINE POPUP "Projektant przycisków"
				MENUITEM "Zapisz definicję przycisków" ACTION ZapiszDefinicjePrzyciskow()
				MENUITEM "Porzuć projektowanie" ACTION PorzucDefiniowaniePrzyciskow()
				MENUITEM "Przywróć domyślne definicje przycisków" ACTION DomyslnaDefinicjaPrzyciskowOknaGlownego()
			END POPUP
		END MENU
Once upon a time, I've created control ACHOICE, which was working link old achoice, you can search it on the forum...
Here it is:
viewtopic.php?f=5&t=1180&p=18241&hilit=achoice#p18241

Re: create menu at runtime with HMG

Posted: Fri Apr 06, 2012 9:07 am
by esgici

Re: create menu at runtime with HMG

Posted: Fri Apr 06, 2012 3:51 pm
by jairpinho
these examples already noticed, which would really need a manager menu at runtime, which can create delete modify menus at runtime.

thanks for the help of all

Re: create menu at runtime with HMG

Posted: Fri Apr 06, 2012 9:06 pm
by tave2009
This is the file ... (Edmenu.prg)
try with this
regards

Re: create menu at runtime with HMG

Posted: Sat Apr 07, 2012 12:11 am
by jairpinho
not compiling from HMG IDE

hbmk2: Harbour: Compilando m¢dulos...
Harbour 3.0.0 (Rev. 16951)
Copyright (c) 1999-2011, http://harbour-project.org/

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(63) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(66) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(69) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(72) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(75) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(79) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(82) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(85) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(88) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(118) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(119) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(122) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(125) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(897) Error E0030 Syntax error "syntax error at ''"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(926) Error E0030 Syntax error "syntax error at 'CM_CAPTION'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(928) Error E0030 Syntax error "syntax error at 'CM_CAPTION'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(932) Error E0030 Syntax error "syntax error at 'CM_CAPTION'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(934) Error E0030 Syntax error "syntax error at 'CM_CAPTION'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(941) Error E0030 Syntax error "syntax error at 'CM_CAPTION'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(943) Error E0030 Syntax error "syntax error at 'CM_CAPTION'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(947) Error E0030 Syntax error "syntax error at 'CM_CAPTION'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(949) Error E0030 Syntax error "syntax error at 'CM_CAPTION'"

22 errors

No code generated.
hbmk2: Erro: Executando o compilador Harbour (interno): 1
(C:\HMG3.0.38\harbour\bin\harbour.exe) -n2 K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg -q -o.hbmk\win\mingw\ -iC:\HMG3.0.38\harbour\include -i. -iC:\HMG3.0.38\include




tave2009 wrote:This is the file ... (Edmenu.prg)
try with this
regards

Re: create menu at runtime with HMG

Posted: Sat Apr 07, 2012 10:35 am
by tave2009
Este software es para la HMG extendida tenes que adaptarlo
Pero ahora te adjunto el ejecutable para que pruebes.
Slds.
Walter

Re: create menu at runtime with HMG

Posted: Sat Apr 07, 2012 11:56 am
by esgici
tave2009 wrote:... tenes que adaptarlo...
Walter
Adapted.

Regards / saludos.

--

Esgici
EdMenu&Demo.zip
EdMenu.prg & Demo.prg
(8.86 KiB) Downloaded 586 times

Re: create menu at runtime with HMG

Posted: Sat Apr 07, 2012 3:44 pm
by tave2009
Español:
Gracias Esgici,
Me asombra tu rapidez.
Saludos
Walter

Inglés (Google)
Thanks Esgici,
It amazes me your speed.
regards
Walter

Re: create menu at runtime with HMG

Posted: Sat Apr 07, 2012 6:17 pm
by jairpinho
this was what I wanted in HMG, THANK ESGICI and tave2009


esgici wrote:
tave2009 wrote:... tenes que adaptarlo...
Walter
Adapted.

Regards / saludos.

--

Esgici
EdMenu&Demo.zip