** ****************************************************************************************** * **EndUser4gl : Exemple d'un langage de 4 ème génération ** ******************************************************************************************* #include "c:\EndUser4gl\4gl\hlp\IncludeSysEU\includesyseu.h" integer : exit_trans1 ,x ; begin_transaction : Trans1 Execute Transaction with exit_trans1 != 1 begin_dialog WinExtendstyle : :WS_EX_DLGMODALFRAME Winstyle : :WS_OVERLAPPED & :WS_CAPTION & :WS_SYSMENU & :WS_THICKFRAME & :WS_MINIMIZEBOX & :WS_MAXIMIZEBOX & CENTERDIALOG 100,150,680,500, " EndUser BUTTON TEXT : Swap Color",UserDialog ButtonText 190, 100,380,40, "1 . SwapColor : button text...." ,buttontext1 create : info "example 1 Button Text......." use ellipse , use Cursor "c:\EndUser4gl\4gl\hlp\PgmCursor\hand-l.cur" ButtonText 190, 160,380,40, "2 . SwapColor : button text...." ,buttontext2 create : info "example 2 Button Text......." , use Cursor "c:\EndUser4gl\4gl\hlp\PgmCursor\hand-l.cur" ButtonBmpDrawLabel 1, 400, 88, 40, "c:\EndUser4gl\4gl\hlp\PgmBmp\cancel.bmp",BoutonCancel create : text " Cancel " , info " Bye Bye........." use ellipse , use Cursor "c:\EndUser4gl\4gl\hlp\PgmCursor\hand-l.cur" ButtonText 190, 220,380,40, "3 . Swapcolor : button text...." ,buttontext3 create : info "example 3 Button Text......." , use Cursor "c:\EndUser4gl\4gl\hlp\PgmCursor\hand-l.cur" end_dialog Begin_Initialize IconDialog(UserDialog:"c:\EndUser4gl\4gl\hlp\pgmicon\19.ico"); SetFontsGroup(30, 12, 0, 0,FW_NORMAL, 0,1, 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_SWISS, "Times New Roman":buttontext1,buttontext2,buttontext3 ) ; End_Initialize SwapColor (buttontext1:red,yellow ,yellow,red ) ; SwapColor (buttontext2:blue,red ,red,black) ; SwapColor (buttontext3:green,white ,orange,black) ; OpenDialog (UserDialog) ; require GetPush(buttontext1) returning (x); if( x Not_Void ) then MsgBox : TITLE "My First button text.................... " Message : " Push is ok " button : MB_OK icon : MB_ICONEXCLAMATION returning (x) ; end_if; begin /* buttontext1 */ end_begin ; GetPush(BoutonCancel) returning (x); if( x Not_Void ) then MsgBox : TITLE "My First TextBox" Message : " Push is ok : Cancel Transaction" button : MB_OK icon : MB_ICONEXCLAMATION returning (x) ; exit_trans1 := 1 ; end_if; end_transaction ;