 Jens-Arne Reumschüssel | Hello together,
here there now code for a very explicit improved MessageBox, The I ActionBox called have. everything is in reinem XProfan written.
ActionBoxen discern itself of MessageBoxen therefore, that - as much as you want Buttons with spare gewählter inscription possible are - Text ex of/ one designed Size scrollable is - Text- and Backgroundcolor spare certainly go can - The type spare chosen go can - two further Icons available stand - spare wählbare Buttons first to the Scrolling integrally down activate go can - a spare chosen WAV-File as Sound using go can - a self written PROC for Help-Button using go can - the everything, my I, very simply To manage is
here the code. If one it executing, get is a row of Examples displayed, The The Opportunities explain.
STRUCT S_ACTIONBOX=Caption$(256),Text$(10001),pText&,TextXSize&,TextMaxYSize&,TextColor&,BkColor&,AnzButtons&,ButtonTexts$(10000),DefButton&,ButtonXSize&,DeactivateButtonsTillLastLineSeen%,Icon&,Sound&,hFont&,HelpButton&,pHelpProc&,HelpProcParam& STRUCT S_HELPINFO=cbSize&,iContextType&,iCtrlId&,hItemHandle&,dwContextId&,MousePosX&,MousePosY& declare _XMessageBox_TextColor&,_XMessageBox_BkColor&,_XMessageBox_hFont&,_XMessageBox_pHelpProc&,_XMessageBox_HelpProcParam& _XMessageBox_TextColor&=@rgb(0,0,0) _XMessageBox_BkColor&=@rgb(255,255,255) _XMessageBox_hFont&=0 _XMessageBox_pHelpProc&=0 _XMessageBox_HelpProcParam&=0
declare ex#,fn$,s$,i%
PROC ActionBox 'Own MessageBox with beliebigen Buttons, gescrolltem Text, beliebigen colours and one beliebigen Sound 'dim ex#,S_ACTIONBOX 'ex#.Caption$: Fensterüberschrift (can omitted, then ="Info") 'ex#.Text$: Meldungstext with maximum 10000 characters (becomes umgebrochen; Wörter, The longer as a row are, go zoned) 'ex#.pText&: Pointer to a String with a discretionary long Meldungstext (becomes taken, if ex#.Text$="" and ex#.pText&<>0) 'ex#.TextXSize&: wide the Textfeldes in Pixeln (can omitted, then =400) 'ex#.TextMaxYSize&: maximum Höhe the Textfeldes in Pixeln (can omitted, then =500), to achieve the maximalen vertikalen extent becomes a Scrollable using 'ex#.TextColor&: Textfarbe (can omitted, then Black) 'ex#.BkColor&: Backgroundcolor (can omitted, then white) 'ex#.AnzButtons&: Number of Buttons (can omitted, then one OK-Button; if it quite no Buttons give should, on -1 settle) - One Help-Button (see below ex#.HelpButton&) won't dazugezählt! 'ex#.ButtonTexts$: Buttonbeschriftungen, through "|" separated - whom Text for a possible Help-Button can as last Text optional with indicate (otherwise becomes "Help" using) 'ex#.DefButton&: number the Default-Buttons (can omitted, then the first Button; if it none Default-Button give should, on -1 settle) 'ex#.ButtonXSize&: wide the Buttons in Pixeln (can omitted, then =100 or. =75 with Default-OK-Button) 'ex#.DeactivateButtonsTillLastLineSeen%: here can bitweise Buttons indicated go, The first activate go, if the Text To to last row gescrollt watts (Button 1: 1, Button 2: 2, Button 3: 4, Button 4: 8 etc.) 'ex#.HelpButton&: 1=fügt a Help-Button hinzu (if this clicked becomes, becomes a ~WM_HELP-Message ans Mainwindow gesendet, where me unclear is, How one The evaluate can, during The MessageBox the program blockiert - remedy: see directly here drunter) 'ex#.pHelpProc: a with @ProcAddr(...) ermittelte Einsprungadresse to a procedure, The called becomes, if the Helpbutton clicked becomes (these PROC must very a 4-byte-Parameter having) 'ex#.HelpProcParam&: one benutzerdefinierter Parameter, the on The HelpProc transfer becomes 'ex#.Icon&: -1=kein Icon, 1=i, 2=?, 3=!, 4=X, 5=Security Shield, 6=Application Icon (can omitted, then =1 without Sound) 'ex#.Sound&: 1=Windows-Sound properly to that Icon, -1=kein Sound, 11-14=Sound How with Icon 1X, 15=Beep, >15=Pointer to a String with a Sound-Filenames (can omitted, then =1) 'case ActionBox(ex#)=1: print "Button 1 clicked" 'dispose ex# '---------------------------------------------- 'it reicht means, only ex#.Text$ To settle, for a minimalistisches Hinweisfenster with a "i"-Icon and one OK-Button without Sound to obtain. '---------------------------------------------- 'Return Value: number the angeklickten Buttons or. 0 with Esc. and with Window close ("X"-Button right supra) parameters ex# declare a%,b%,c%,d%,i%,o%,b#,hD%,hB%[],meldungstext$,s$,s2$,s3$,lines$[],anzlines%,aktline%,workline$,end%,aktword%,anzwords%,savedfont%,saveddialogfont%,yofs%,xsize%,ysize%,ret%,hF% declare xtextsize%,textrandsize%,xiconsize%,xbuttonsize%,ybuttonsize%,IconX1%,IconY1%,IconX2%,IconY2%,hVertScrollbar%,usevertscrollbar%,maxvscrollpos%,oldvscrollpos%,aktzeile%,oldfastmode%,hIcon% declare HelpInfo#,oldusermess16%,oldusermess522% oldfastmode%=@Set("FastMode",0) '{ 'User Messages lay out oldusermess16%=@IsUserMessage($10) if oldusermess16%=0 usermessages $10 endif oldusermess522%=@IsUserMessage(522) if oldusermess522%=0 usermessages 522 endif '} '{ 'variables fill meldungstext$="" if ex#.Text$<>"" meldungstext$=ab#.Text$ elseif ex#.pText&<>0 meldungstext$=@string$(ex#.pText&,0) endif dim HelpInfo#,S_HELPINFO ret%=0 textrandsize%=10 hVertScrollbar%=0 usevertscrollbar%=0 oldvscrollpos%=0 anzlines%=0 hF%=@create("FONT","Segoe UI",-12,0,0,0,0) '} '{ 'Default-values settle, unless indicated if ex#.TextXSize&=0 ex#.TextXSize&=400 endif if ex#.TextMaxYSize&=0 ex#.TextMaxYSize&=500 endif if ex#.BkColor&=0 ex#.BkColor&=@rgb(255,255,255) endif if ex#.Icon&=0 ex#.Icon&=1 if ex#.Sound&=0 ex#.Sound&=-1 endif endif if ex#.Icon&>0 xiconsize%=50 else xiconsize%=0 endif if ex#.Caption$="" ex#.Caption$="Info" if ex#.Icon&=2 ex#.Caption$="question" elseif ex#.Icon&=3 ex#.Caption$="deference" elseif ex#.Icon&=4 ex#.Caption$="Error" endif endif if ex#.Sound&=0 ex#.Sound&=1 endif if ex#.ButtonXSize&=0 if ex#.AnzButtons&>0 ex#.ButtonXSize&=100 else ex#.ButtonXSize&=75 endif endif if ex#.AnzButtons&=0 ex#.AnzButtons&=1 ex#.ButtonTexts$="OK" endif if ex#.HelpButton& ex#.AnzButtons&=ab#.AnzButtons&+1 if @substr$(ex#.ButtonTexts$,ex#.AnzButtons&,"|")=0 if ex#.ButtonTexts$<>"" ex#.ButtonTexts$=ab#.ButtonTexts$+"|" endif ex#.ButtonTexts$=ab#.ButtonTexts$+"Help" endif endif if ex#.AnzButtons&>0 if ex#.DefButton&=0 ex#.DefButton&=1 'if it none Default-Button give should, on -1 settle elseif ex#.DefButton&>ex#.AnzButtons& 'it watts evident forget, after a previous ActionBox with More Buttons as this whom DefButton so To settle, that it to this ActionBox fit --> Button 1 take ex#.DefButton&=1 'if it none Default-Button give should, on -1 settle endif endif if ex#.hFont&=0 usefont "Segoe UI",-12,0,0,0,0 else SetGrafikFont ex#.hFont& endif '} xtextsize%=ab#.TextXSize& if ex#.Icon&<1 xtextsize%=xtextsize%+50 'xiconsize% endif xsize%=xiconsize%+textrandsize%+xtextsize%+textrandsize% xbuttonsize%=ab#.ButtonXSize& ybuttonsize%=25 savedfont%=@GetGrafikFont() '{ '"\t" in six Spaces transform meldungstext$=@translate$(meldungstext$,"\t"," ") '} if meldungstext$<>"" '{ 'Zeilenumbrüche ("\n") manage anzlines%=1 lines$[1]=meldungstext$ i%=1 while i%<=anzlines% if @instr("\n",lines$[i%]) inc anzlines% for o%,anzlines%-1,i%+1,-1 lines$[o%+1]=lines$[o%] endfor 'o% s$=lines$[i%] lines$[i%]=@left$(s$,@instr("\n",s$)-1) lines$[i%+1]=@right$(s$,@len(s$)-@instr("\n",s$)-1) endif inc i% endwhile '} '{ 'Text$ in single Lines divide end%=0 aktword%=0 aktline%=1 workline$=lines$[aktline%] anzwords%=@len(workline$," ") s$="" whilenot end% if anzwords%=0 else inc aktword% if @GetDrawStringLenX(s$+" "+@substr$(workline$,aktword%," "))<=xtextsize% case s$<>"": s$=s$+" " s$=s$+@substr$(workline$,aktword%," ") else if @GetDrawStringLenX(@substr$(workline$,aktword%," "))<=xtextsize% dec aktword% lines$[aktline%]=s$ inc anzlines% for i%,anzlines%-1,aktline%+1,-1 lines$[i%+1]=lines$[i%] endfor 'i% inc aktline% s$="" else 'the single word is longer as a row: character for character telescope and word share s2$=@substr$(workline$,aktword%," ") for i%,@len(s2$)-1,1,-1 if @GetDrawStringLenX(@left$(s2$,i%)+" ")<=xtextsize% s2$=@left$(s2$,i%)+" "+@right$(s2$,@len(s2$)-i%) break endif endfor 'i% s3$="" for i%,1,anzwords% case s3$<>"": s3$=s3$+" " if i%<>aktword% s3$=s3$+@substr$(workline$,i%," ") else s3$=s3$+s2$ endif endfor 'i% workline$=s3$ dec aktword% inc anzwords% endif endif endif if aktword%=anzwords% if s$<>"" lines$[aktline%]=s$ endif if aktline%=anzlines% end%=1 else inc aktline% workline$=lines$[aktline%] anzwords%=@len(workline$," ") aktword%=0 s$="" endif endif endwhile '} endif '{ 'ggf. a second row add (with Icon will only a row thick from) if ex#.Icon&>0 while anzlines%<2 inc anzlines% lines$[anzlines%]="" endwhile endif '} '{ 'xsize% adjust a%=0 for i%,1,anzlines% if lines$[i%]<>"" b%=@GetDrawStringLenX(lines$[i%]) if b%>a% a%=b% endif endif endfor 'i% xtextsize%=a%+textrandsize% xsize%=xiconsize%+textrandsize%+xtextsize%+textrandsize% if xsize%<(textrandsize%*(ab#.AnzButtons&+1))+(xbuttonsize%*ab#.AnzButtons&)+(2*@GetWindowThinBorderWidth()) xsize%=(textrandsize%*(ex#.AnzButtons&+1))+(xbuttonsize%*ex#.AnzButtons&)+(2*@GetWindowThinBorderWidth()) endif '} '{ 'yofs% & ysize& detect yofs%=GetDrawStringLenY("X") if (anzlines%*yofs%)<=ab#.TextMaxYSize& ysize%=textrandsize%+(anzlines%*yofs%)+(textrandsize%*2)+ybuttonsize%+textrandsize%+(2*@GetWindowThinBorderWidth()) else usevertscrollbar%=1 ysize%=textrandsize%+(ex#.TextMaxYSize&)+(textrandsize%*2)+ybuttonsize%+textrandsize%+(2*@GetWindowThinBorderWidth()) endif '} '{ 'xsize% on possible Scrollable adjust if usevertscrollbar% xsize%=xsize%+15 endif '} '{ 'dialog set up hD%=@create("DIALOG",%HWnd,ex#.Caption$,((%maxx\2)-(xsize%\2)),((%maxy\2)-(ysize%\2)),xsize%,ysize%) a%=@GetAbsWindowPosX1(hD%) b%=@GetAbsWindowPosY1(hD%) c%=@GetAbsWindowPosX2(hD%) d%=@GetAbsWindowPosY2(hD%) SetWindowPos hD%=a%,(b%-((ysize%-@height(hD%))\2))-(c%-a%),((d%-b%)+(ysize%-@height(hD%)));-1 saveddialogfont%=@GetDialogFont() SetDialogFont hF% StartPaint hD% '{ 'background malen 'cls @rgb(255,255,255) UseBrush 1,ex#.BkColor& '@rgb(255,255,255) USEP 0,0,ex#.BkColor& '@rgb(255,255,255) rectangle 0,0-@width(hD%),(@height(hD%)-textrandsize%-ybuttonsize%-textrandsize%) '} '{ 'Scrollable create if usevertscrollbar% hVertScrollbar%=@Create("VScroll",hD%,"",@width(hD%)-15,0,15,textrandsize%+ex#.TextMaxYSize&+textrandsize%) maxvscrollpos%=anzlines%-(ex#.TextMaxYSize&\yofs%)+1 SetScrollRange hVertScrollbar%,1,maxvscrollpos% oldvscrollpos%=@GetScrollPos(hVertScrollbar%) endif '} '{ 'Icon draw if ex#.Icon&>0 IconX1%=10 IconY1%=10 IconX2%=IconX1%+35 IconY2%=IconY1%+35 '{ 'JR-Icons (self drawn) - auskommentiert /* '{ '1=i if ex#.Icon&=1 UseBrush 1,@rgb(0,100,255) USEP 0,0,@rgb(0,0,0) ellipsis IconX1%,IconY1%-IconX2%,IconY2% usefont "Times New novel",30,0,1,0,0 textcolor @rgb(255,255,255),-1 drawtext IconX1%+((IconX2%-IconX1%)\2),IconY1%+1,"i",6 '} '{ '2=? elseif ex#.Icon&=2 UseBrush 1,@rgb(0,100,255) USEP 0,0,@rgb(0,0,0) ellipsis IconX1%,IconY1%-IconX2%,IconY2% usefont "Times New novel",30,0,1,0,0 textcolor @rgb(255,255,255),-1 drawtext IconX1%+((IconX2%-IconX1%)\2)+1,IconY1%+2,"?",6 '} '{ '3=! elseif ex#.Icon&=3 UseBrush 1,@rgb(255,220,0) USEP 0,2,@rgb(255,180,0) line IconX1%,IconY2%-(IconX1%+((IconX2%-IconX1%)\2)),IconY1% line (IconX1%+((IconX2%-IconX1%)\2)),IconY1%-IconX2%,IconY2% line IconX1%,IconY2%-IconX2%,IconY2% fill IconX1%+10,IconY2%-10,@rgb(255,180,0) usefont "Arial",30,0,1,0,0 textcolor @rgb(0,0,0),-1 drawtext IconX1%+((IconX2%-IconX1%)\2)+1,IconY1%+5,"!",6 '} '{ '4=X elseif ex#.Icon&=4 UseBrush 1,@rgb(255,0,0) USEP 0,0,@rgb(0,0,0) ellipsis IconX1%,IconY1%-IconX2%,IconY2% usefont "Arial",30,0,1,0,0 textcolor @rgb(255,255,255),-1 drawtext IconX1%+((IconX2%-IconX1%)\2)+1,IconY1%+2,"X",6 '} */ '} '{ 'windows-Icons '{ '1=i if ex#.Icon&=1 hIcon%=@external("USER32.DLL","LoadIconA",0,32516) '32516=~IDI_INFORMATION drawicon hIcon%,IconX1%,IconY1% '} '{ '2=? elseif ex#.Icon&=2 hIcon%=@external("USER32.DLL","LoadIconA",0,32514) '32514=~IDI_QUESTION drawicon hIcon%,IconX1%,IconY1% '} '{ '3=! elseif ex#.Icon&=3 hIcon%=@external("USER32.DLL","LoadIconA",0,32515) '32515=~IDI_WARNING drawicon hIcon%,IconX1%,IconY1% '} '{ '4=X elseif ex#.Icon&=4 hIcon%=@external("USER32.DLL","LoadIconA",0,32513) '32513=~IDI_ERROR drawicon hIcon%,IconX1%,IconY1% '} '{ '5=Security Shield elseif ex#.Icon&=5 hIcon%=@external("USER32.DLL","LoadIconA",0,32518) '32518=~IDI_SHIELD drawicon hIcon%,IconX1%,IconY1% '} '{ '6=Application Icon elseif ex#.Icon&=6 'hIcon%=@external("USER32.DLL","LoadIconA",0,~IDI_APPLICATION) '~IDI_WINLOGO 'functions both not correctly. dim b#,10001 @external("KERNEL32.DLL","GetModuleFileNameA",0,b#,10000) hIcon%=@create("HICON",@string$(b#,0),0) dispose b# drawicon hIcon%,IconX1%,IconY1% DeleteObject hIcon% '} '} endif textcolor @rgb(0,0,0),-1 endif '} '{ 'Write text if ex#.hFont&=0 usefont "Segoe UI",-12,0,0,0,0 else SetGrafikFont ex#.hFont& endif textcolor ex#.TextColor&,-1 aktzeile%=1 a%=aktzeile% if usevertscrollbar% b%=aktzeile%+((ex#.TextMaxYSize&\yofs%)-1) else b%=anzlines% endif for i%,a%,b% drawtext xiconsize%+textrandsize%,textrandsize%+(yofs%*(i%-a%)),lines$[i%],0 endfor 'i% '} EndPaint '{ 'Buttons create for i%,1,ex#.AnzButtons& if i%<>ex#.DefButton& hB%[i%]=@create("BUTTON",hD%,@substr$(ex#.ButtonTexts$,i%,"|"),@width(hD%)-(textrandsize%*(ex#.AnzButtons&-(i%-1)))-(xbuttonsize%*(ex#.AnzButtons&-(i%-1))),@height(hD%)-(ybuttonsize%+textrandsize%),xbuttonsize%,ybuttonsize%) else hB%[i%]=@create("DEFBUTTON",hD%,@substr$(ex#.ButtonTexts$,i%,"|"),@width(hD%)-(textrandsize%*(ex#.AnzButtons&-(i%-1)))-(xbuttonsize%*(ex#.AnzButtons&-(i%-1))),@height(hD%)-(ybuttonsize%+textrandsize%),xbuttonsize%,ybuttonsize%) endif endfor 'i% if ex#.DefButton&>0 @setfocus(hB%[ex#.DefButton&]) endif if usevertscrollbar% for i%,1,ex#.AnzButtons& if (ex#.DeactivateButtonsTillLastLineSeen% & (2 ^ (i%-1)))=(2 ^ (i%-1)) enablewindow hB%[i%],0 endif endfor 'i% endif '} '{ 'tone Play if ex#.Sound&=1 if ex#.Icon&=1 MessageBeep($40) '~MB_ICONASTERISK elseif ex#.Icon&=2 MessageBeep($20) '~MB_ICONQUESTION elseif ex#.Icon&=3 MessageBeep($30) '~MB_ICONEXCLAMATION elseif ex#.Icon&=4 MessageBeep($10) '~MB_ICONERROR elseif ex#.Icon&=5 MessageBeep($30) '~MB_ICONEXLAMATION endif elseif ex#.Sound&=11 MessageBeep($40) '~MB_ICONASTERISK elseif ex#.Sound&=12 MessageBeep($20) '~MB_ICONQUESTION elseif ex#.Sound&=13 MessageBeep($30) '~MB_ICONEXCLAMATION elseif ex#.Sound&=14 MessageBeep($10) '~MB_ICONERROR elseif ex#.Sound&=15 MessageBeep(0) '~MB_OK (standard-Beep) elseif ex#.Sound&>15 PlaySound @string$(ex#.Sound&,0),1 endif '} '} '{ 'Eingabehandling end%=0 whilenot end% waitinput '{ 'Esc. or. Window close if (((@iskey(27)=1) or (%umessage=$10)) and (@external("USER32.DLL","GetForegroundWindow")=hD%)) end%=1 ret%=0 while @iskey(27) sleep 25 endwhile ClearKeyboardBuffer '} '{ 'Scrollable elseif (usevertscrollbar%=1) and (@GetScrollPos(hVertScrollbar%)<>oldvscrollpos%) oldvscrollpos%=@GetScrollPos(hVertScrollbar%) StartPaint hD% UseBrush 1,ex#.BkColor& '@rgb(255,255,255) USEP 0,0,ex#.BkColor& '@rgb(255,255,255) rectangle xiconsize%,textrandsize%-(xiconsize%+xtextsize%+textrandsize%),(textrandsize%+ex#.TextMaxYSize&) if ex#.hFont&=0 usefont "Segoe UI",-12,0,0,0,0 else SetGrafikFont ex#.hFont& endif textcolor ex#.TextColor&,-1 aktzeile%=oldvscrollpos% a%=aktzeile% b%=aktzeile%+((ex#.TextMaxYSize&\yofs%)-1) for i%,a%,b% drawtext xiconsize%+textrandsize%,textrandsize%+(yofs%*(i%-a%)),lines$[i% ],0 endfor 'i% EndPaint if usevertscrollbar% if oldvscrollpos%=maxvscrollpos% for i%,1,ex#.AnzButtons& if (ex#.DeactivateButtonsTillLastLineSeen% & (2 ^ (i%-1)))=(2 ^ (i%-1)) enablewindow hB%[i%],1 endif endfor 'i% endif endif '} '{ 'Mausrad elseif %uMessage=522 if &uwParam<0 'nach unten gedreht a%=@GetScrollPos(hVertScrollbar%) inc a% if a%>maxvscrollpos% a%=maxvscrollpos% endif if a%<>oldvscrollpos% oldvscrollpos%=a% SetScrollPos hVertScrollbar%,oldvscrollpos% StartPaint hD% UseBrush 1,ab#.BkColor& '@rgb(255,255,255) USEP 0,0,ex#.BkColor& '@rgb(255,255,255) rectangle xiconsize%,textrandsize%-(xiconsize%+xtextsize%+textrandsize%),(textrandsize%+ex#.TextMaxYSize&) if ex#.hFont&=0 usefont "Segoe UI",-12,0,0,0,0 else SetGrafikFont ex#.hFont& endif textcolor ex#.TextColor&,-1 aktzeile%=oldvscrollpos% a%=aktzeile% b%=aktzeile%+((ex#.TextMaxYSize&\yofs%)-1) for i%,a%,b% drawtext xiconsize%+textrandsize%,textrandsize%+(yofs%*(i%-a%)),lines$[i% ],0 endfor 'i% EndPaint if oldvscrollpos%=maxvscrollpos% for i%,1,ex#.AnzButtons& if (ex#.DeactivateButtonsTillLastLineSeen% & (2 ^ (i%-1)))=(2 ^ (i%-1)) enablewindow hB%[i%],1 endif endfor 'i% endif endif elseif &uwParam>0 'to supra turned a%=@GetScrollPos(hVertScrollbar%) dec a% if a%<1 a%=1 endif if a%<>oldvscrollpos% oldvscrollpos%=a% SetScrollPos hVertScrollbar%,oldvscrollpos% StartPaint hD% UseBrush 1,ex#.BkColor& '@rgb(255,255,255) USEP 0,0,ex#.BkColor& '@rgb(255,255,255) rectangle xiconsize%,textrandsize%-(xiconsize%+xtextsize%+textrandsize%),(textrandsize%+ex#.TextMaxYSize&) if ex#.hFont&=0 usefont "Segoe UI",-12,0,0,0,0 else SetGrafikFont ex#.hFont& endif textcolor ex#.TextColor&,-1 aktzeile%=oldvscrollpos% a%=aktzeile% b%=aktzeile%+((ex#.TextMaxYSize&\yofs%)-1) for i%,a%,b% drawtext xiconsize%+textrandsize%,textrandsize%+(yofs%*(i%-a%)),lines$[i% ],0 endfor 'i% EndPaint endif endif '} '{ 'Buttons else '{ 'normal Buttons if ex#.HelpButton&=0 a%=ab#.AnzButtons& else a%=ab#.AnzButtons&-1 endif for i%,1,a% if @clicked(hB%[i%]) end%=1 ret%=i% break endif endfor 'i% '} '{ 'Help-Button if end%=0 if ex#.HelpButton& if @clicked(hB%[ex#.AnzButtons&]) HelpInfo#.cbsize&=@sizeof(HelpInfo#) HelpInfo#.iContextType&=1 '1=~HELPINFO_WINDOW HelpInfo#.iCtrlId&=0 HelpInfo#.hitemhandle&=hD% HelpInfo#.dwContextId&=0 HelpInfo#.MousePosX&=@MouseAbsX() HelpInfo#.MousePosY&=@MouseAbsY() @sendmessage(%HWnd,83,0,HelpInfo#) '83=~WM_HELP if ex#.pHelpProc& SetWindowPos hD%=@GetAbsWindowPosX1(hD%),@GetAbsWindowPosY1(hD%)-(@GetAbsWindowPosX2(hD%)-@GetAbsWindowPosX1(hD%)),(@GetAbsWindowPosY2(hD%)-@GetAbsWindowPosY1(hD%));1 'ActionBox into background expedite, there tappt im dunkeln really topmost is and a ggf. from the HelpProc uses Window überdecken would @call(ex#.pHelpProc&,ex#.HelpProcParam&) SetWindowPos hD%=@GetAbsWindowPosX1(hD%),@GetAbsWindowPosY1(hD%)-(@GetAbsWindowPosX2(hD%)-@GetAbsWindowPosX1(hD%)),(@GetAbsWindowPosY2(hD%)-@GetAbsWindowPosY1(hD%));-1 'ActionBox again topmost make if @iskey(27) while @iskey(27) sleep 25 endwhile ClearKeyboardBuffer endif endif endif endif endif '} '} endif endwhile '} '{ 'straighten up @setfocus(%HWnd) @destroywindow(hD%) DeleteObject hF% SetGrafikFont savedfont% SetDialogFont saveddialogfont% dispose HelpInfo# '{ 'User Messages restore if oldusermess16%=0 usermessages -$10 endif if oldusermess522%=0 usermessages -522 endif '} @set("FastMode",oldfastmode%) '} return ret% ENDPROC 'ActionBox
PROC ActionBoxReset 'setting any values of/ one ActionBox-Memory-Variables on standard back (useful, if one The Memory-Variable weiterbenutzen would like and before many individuelle Settings undertaken has) parameters ex# @external("KERNEL32.DLL","RtlFillMemory",ex#,@sizeof(ex#),0) ENDPROC 'ActionBoxReset
PROC XMessageBox 'simulate a standard-MessageBox (same Parameter and Ausgabewerte) with the Vorteilen the ActionBox; simply "MessageBox" in the code through "XMessageBox" supplant (and these Procedures as well as The global structure- and Variablendefinitionen take naturally) 'there's five globale variables, around the standard-Messageboxen still a little bit individually style to: '_XMessageBox_TextColor&: Textfarbe (with @RGB(...) To produce) '_XMessageBox_BkColor&: Backgroundcolor (with @RGB(...) To produce) '_XMessageBox_hFont&: type (with @Create("FONT",...) To produce) '_XMessageBox_pHelpProc&: Einsprungadresse to a Help-procedure, The called becomes, if one whom Help-Button activate and it clicked has (is with @procaddr(...) To ermitteln; The PROC must very a 4-byte-Parameter having) '_XMessageBox_HelpProcParam&: one benutzerdefinierter Parameter, the the Help-procedure transfer becomes parameters Text$,caption$,flags& declare ex#,ret& ret&=0 dim ex#,S_ACTIONBOX ex#.Caption$=caption$ ex#.pText&=@addr(Text$) ex#.TextXSize&=325 ex#.TextColor&=_XMessageBox_TextColor& ex#.BkColor&=_XMessageBox_BkColor& if _XMessageBox_hFont& ex#.hFont&=_XMessageBox_hFont& endif '{ '? Happen? evaluate '{ 'Buttons if (flags& & 5)=5 ex#.AnzButtons&=2 ex#.ButtonTexts$="Wiederholen|Abbrechen" elseif (flags& & 4)=4 ex#.AnzButtons&=2 ex#.ButtonTexts$="Ja|Nein" elseif (flags& & 3)=3 ex#.AnzButtons&=3 ex#.ButtonTexts$="Ja|Nein|Abbrechen" elseif (flags& & 1)=1 ex#.AnzButtons&=2 ex#.ButtonTexts$="OK|Abbrechen" elseif (flags& & 2)=2 ex#.AnzButtons&=3 ex#.ButtonTexts$="Abbrechen|Wiederholen|Ignorieren" endif if (flags& & 768)=768 ex#.DefButton&=4 elseif (flags& & 256)=256 ex#.DefButton&=2 elseif (flags& & 512)=512 ex#.DefButton&=3 else ex#.DefButton&=1 endif '} '{ 'Icon if (flags& & 96)=96 ex#.Icon&=-1 ex#.Sound&=15 elseif (flags& & 64)=64 ex#.Icon&=1 elseif (flags& & 48)=48 ex#.Icon&=3 elseif (flags& & 16)=16 ex#.Icon&=4 elseif (flags& & 32)=32 ex#.Icon&=2 else ex#.Icon&=-1 endif '} '{ 'Help-Button if (flags& & 16384)=16384 ex#.HelpButton&=1 if _XMessageBox_pHelpProc& ex#.pHelpProc&=_XMessageBox_pHelpProc& ex#.HelpProcParam&=_XMessageBox_HelpProcParam& endif endif '} '} ret&=@ActionBox(ex#) '{ 'Result mappen if (flags& & 5)=5 'ex#.ButtonTexts$="Wiederholen|Abbrechen" if ret&=1 ret&=4 elseif ret&=2 ret&=2 endif elseif (flags& & 4)=4 'ex#.ButtonTexts$="Ja|Nein" if ret&=1 ret&=6 elseif ret&=2 ret&=7 endif elseif (flags& & 3)=3 'ex#.ButtonTexts$="Ja|Nein|Abbrechen" if ret&=1 ret&=6 elseif ret&=2 ret&=7 elseif ret&=3 ret&=2 endif elseif (flags& & 1)=1 'ex#.ButtonTexts$="OK|Abbrechen" if ret&=1 ret&=1 elseif ret&=2 ret&=2 endif elseif (flags& & 2)=2 'ex#.ButtonTexts$="Abbrechen|Wiederholen|Ignorieren" if ret&=1 ret&=3 elseif ret&=2 ret&=4 elseif ret&=3 ret&=5 endif endif '} dispose ex# return ret& ENDPROC 'XMessageBox
PROC pHelpProc 'becomes of Help-Button of/ one ActionBox called 'here can unfortunately no further ActionBox using go! the were Variablenkonflikte. If to the absolutely would like, must one The ActionBox-Proc this duplizieren (z.B. as PROC ActionBox2). parameters hActionBox& 'benutzerdefinierter Parameter (ex#.HelpProcParam& in the Hauptprogramm), becomes not moreover using - helpful z.B., if one on different ActionBoxes with unterschiedlicher Help react would like (went naturally too with self-contained Procs) @MessageBox("Help-procedure called. Presumably is a DLL defekt.\n\nKeine alarmism, these only a Simulation.","Help-procedure",64) ENDPROC 'pHelpProc
'{ 'Hilfsfunktionen: PROC MessageBeep '{ 'possible values for flag ' Value Meaning ' ' 0xFFFFFFFF A simple beep. If the sound card is hardship available, the sound is generated using the speaker. ' ' MB_ICONASTERISK ' 0x00000040L ' See MB_ICONINFORMATION. ' ' MB_ICONEXCLAMATION ' 0x00000030L ' See MB_ICONWARNING. ' ' MB_ICONERROR ' 0x00000010L ' The sound specified as the windows Critical Stop sound. ' ' MB_ICONHAND ' 0x00000010L ' See MB_ICONERROR. ' ' MB_ICONINFORMATION ' 0x00000040L ' The sound specified as the windows Asterisk sound. ' ' MB_ICONQUESTION ' 0x00000020L ' The sound specified as the windows Question sound. ' ' MB_ICONSTOP ' 0x00000010L ' See MB_ICONERROR. ' ' MB_ICONWARNING ' 0x00000030L ' The sound specified as the windows Exclamation sound. ' ' MB_OK ' 0x00000000L ' The sound specified as the windows Default Beep sound. '} parameters flag& declare pc& pc&=%pcount if pc&=0 flag&=$FFFFFFFF endif @external("USER32.DLL","MessageBeep",flag&) ENDPROC 'MessageBeep PROC GetGrafikFont 'gives too with the Systemschriftart one gültiges lever back (and not 0); the can later again to that settle using go parameters HDC& declare a&,pc& pc&=%PCount if pc&=0 HDC&=%HDC endif a&=@external("GDI32.DLL","GetCurrentObject",HDC&,6) '6=~obj_font return a& ENDPROC 'GetGrafikFont PROC SetGrafikFont parameters hF%,HDC& 'hF% can't 0 for Systemfont his, but naturally one with GetSystemFont ermitteltes lever. with this function can »usefont hF%« release, what Profan not can (with usefont must always hard The Schriftartspezifikation indicated go). declare a&,pc& pc&=%PCount if pc&=1 HDC&=%HDC endif a&=@external("GDI32.DLL","SelectObject",HDC&,hF%) return a& ENDPROC 'SetGrafikFont PROC GetDrawStringLenX 'determined The horizontale extent of TrueType-Text parameters s$ declare b#,ret& dim b#,8 if @external("GDI32.DLL","GetTextExtentPoint32A",%HDC,@addr(s$),@len(s$),b#)=1 ret&=@long(b#,0) else ret&=0 endif dispose b# return ret& ENDPROC 'GetDrawStringLen PROC GetDrawStringLenY 'determined The vertikale extent of TrueType-Text parameters s$ declare b#,ret& dim b#,8 if @external("GDI32.DLL","GetTextExtentPoint32A",%HDC,@addr(s$),@len(s$),b#)=1 ret&=@long(b#,4) else ret&=0 endif dispose b# return ret& ENDPROC 'GetDrawStringLen PROC GetAbsWindowPosX1 'determined The left upper absolute Fensterposition parameters hW& declare b#,ret& dim b#,4*4 @external("user32.dll","GetWindowRect",hW&,b#) ret&=@long(b#,0) dispose b# return ret& ENDPROC 'GetAbsWindowPosX1 PROC GetAbsWindowPosY1 parameters hW& declare b#,ret& dim b#,4*4 @external("user32.dll","GetWindowRect",hW&,b#) ret&=@long(b#,4) dispose b# return ret& ENDPROC 'GetAbsWindowPosY1 PROC GetAbsWindowPosX2 'it'll The absolute position determined! for wide/Höhe GetWindowSpan use! parameters hW& declare b#,ret& dim b#,4*4 @external("user32.dll","GetWindowRect",hW&,b#) ret&=@long(b#,8) dispose b# return ret& ENDPROC 'GetAbsWindowPosX2 PROC GetAbsWindowPosY2 'it'll The absolute position determined! for wide/Höhe GetWindowSpan use! parameters hW& declare b#,ret& dim b#,4*4 @external("user32.dll","GetWindowRect",hW&,b#) ret&=@long(b#,12) dispose b# return ret& ENDPROC 'GetAbsWindowPosY2 PROC GetWindowThinBorderWidth declare erg& erg&=@external("user32.dll","GetSystemMetrics",7) '~SM_CXFIXEDFRAME=7 return erg& ENDPROC 'GetWindowThinBorderWidth PROC GetDialogFont 'gives a handle to currently gesetzten DialogFont back (0, if The Systemschriftart tuned is) declare dummycontrol%,hF% dummycontrol%=@create("TEXT",%HWnd,"",0,0,0,0) hF%=@sendmessage(dummycontrol%,49,0,0) '49=~wm_getfont @destroywindow(dummycontrol%) return hF% ENDPROC 'GetDialogFont PROC ClearKeyboardBuffer while @inkey$()<>"" endwhile ENDPROC 'ClearKeyboardBuffer PROC MouseAbsX 'absolute x-Mausposition Declare Point#,XX& Dim Point#,8 @external("user32.dll","GetCursorPos",Point#) XX&=@long(Point#,0) Dispose Point# Return XX& ENDPROC 'MouseX PROC MouseAbsY 'absolute y-Mausposition Declare Point#,YY& Dim Point#,8 @external("user32.dll","GetCursorPos",Point#) YY&=@long(Point#,4) Dispose Point# Return YY& ENDPROC 'MouseY '}
'Hauptprogramm: cls dim ex#,S_ACTIONBOX '{ 'simple ActionBox with integrally little Programmieraufwand ex#.Text$="these a integrally simple Actionbox with only one Button.\n\nSie needed only a Definition, namely whom anzuzeigenden Text." print "Button: "+@st$(@actionbox(ex#)) '} '{ 'Actionbox with three benutzerdefinierten Buttons ActionBoxReset(ex#) 'setting any values on standard back ex#.Text$="These ActionBox has three Buttons, its Text spare chosen go can.\n\nDer Return Value is the clicked Button or 0 in the entrapment of Esc. or Window close (\qX\q right supra)." ex#.AnzButtons&=3 ex#.ButtonTexts$="Button 1|Button 2|Button 3" print "Button: "+@st$(@actionbox(ex#)) '} '{ 'Actionbox with three benutzerdefinierten Buttons, of/ one definierten Headline and one definierten Icon ActionBoxReset(ex#) ex#.Caption$="Own Headline" ex#.Text$="These ActionBox has anew three Buttons, this time a defined Headline and a definiertes Icon, which of standard-Windowston accompanied becomes.\n\nDies is deliberate the same thing Icon, the with whom recent ActionBoxes uses watts. though becomes this time the suitable Sound moreover played, because the Icon explizit staid watts." ex#.AnzButtons&=3 ex#.ButtonTexts$="Button 1|Button 2|Button 3" ex#.Icon&=1 print "Button: "+@st$(@actionbox(ex#)) '} '{ 'again with anderem Icon ActionBoxReset(ex#) ex#.Caption$="Own Headline" ex#.Text$="the same thing again, only with anderem Icon.\n\nEs gives six of it (instead of the from Profan known four):\n- .Icon&=1: \qi\q\n- .Icon&=2: \q?\q (without tone, windows has for none (More))\n- .Icon&=3: \q!\q\n- .Icon&=4: \qX\q\n- .Icon&=5: Security Shield\n- .Icon&=6: Program-Icon\n\n\ there's in this ActionBox now moreover a of first abweichenden Default-Button.\n\n\ one is incidentally not on The windows-Sounds tied, separate can, if one would like, a completely spare wählbaren Sound at Open the ActionBox Play (a beliebigen WAV-File)." ex#.AnzButtons&=3 ex#.ButtonTexts$="Button 1|Button 2|Button 3" ex#.DefButton&=2 ex#.Icon&=3 print "Button: "+@st$(@actionbox(ex#)) '} '{ 'with very long Text, the gescrollt becomes ActionBoxReset(ex#) ex#.Caption$="ActionBox with scrollbarem Text" ex#.Text$="here there very plenty Text. instead of the box always larger To make, How windows it do would, there here a Maximalgröße, ex the the Text scrollable made becomes. the Text box is standardmäßig maximum 500 Pixel high, this is but naturally adjustable.\n\nHier becomes \ this time the new Security Shield-Icon Windows uses. Very useable z.B. for Message, that a Password-request fehlgeschlagen is.\n\n\ it was To remember, that The Berechnung the Zeilenumbrüche a fühlbare Time gedauert has (To The ActionBox displayed watts). I could naturally a DLL write, The the faster Done, but today I thought, that reines XProfan without Schnickschnack and further \ Files too time again integrally relaxing for all would. ;-)\n\n\ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text.\n\nUngefähr to Half there.\n\n \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text.\n\nUnten arrived!" ex#.AnzButtons&=3 ex#.ButtonTexts$="Button 1|Button 2|Button 3" ex#.DefButton&=2 ex#.Icon&=5 print "Button: "+@st$(@actionbox(ex#)) '} '{ 'selected Buttons go first clickable, if one whom Text To down gescrollt has ActionBoxReset(ex#) ex#.Caption$="ActionBox with scrollbarem Text and first of all deaktivierten Buttons" ex#.Text$="this time is the 3. Button first of all deaktiviert. first then, if the user whom Text integrally down gescrollt (and hopefully red) has, becomes this Button activate. so is z.B. a Lizenzvereinbarung to Aktivierung the Installationsbuttons integrally slight To release.\n\n\ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text.\n\nUngefähr to Half there.\n\n \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. \ integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text. integrally plenty Text.\n\nUnten arrived. The installation can now launched go." ex#.AnzButtons&=3 ex#.ButtonTexts$="Zurück|Abbruch|Installieren" ex#.DefButton&=2 ex#.DeactivateButtonsTillLastLineSeen%=4 'The first of all deaktivierten Buttons go bitweise transfer (Button 1=1, Button 2=2, Button 3=4, Button 4=8 etc.) print "Button: "+@st$(@actionbox(ex#)) '} '{ 'Fehlermeldungs-ActionBox with rotem background and great Font ActionBoxReset(ex#) ex#.Caption$="Fehlermeldungs-ActionBox with rotem background and great Font" ex#.Text$="FEHLER!\n\nDie File Blablub.dll watts not found. your selection:" ex#.AnzButtons&=3 ex#.ButtonTexts$="Wiederholen|Übergehen|Abbrechen" ex#.DefButton&=3 ex#.hFont&=@create("Font","Arial",20,0,1,0,0) ex#.TextColor&=@rgb(255,255,255) ex#.BkColor&=@rgb(200,0,0) ex#.Icon&=4 print "Button: "+@st$(@actionbox(ex#)) DeleteObject ex#.hFont& '} '{ 'Fehlermeldungs-ActionBox with Help-Button ActionBoxReset(ex#) ex#.Caption$="Fehlermeldungs-ActionBox with rotem background and Help-Button" ex#.Text$="now there a additional Help-Button. these one spezieller Button, the a benutzerdefinierte function aufruft, in the one everything employ can, what would like, circa further Hilfestellung to a Message To do.\n\nBei the standard-MessageBox becomes demgegenüber solely \ a ~WM_HELP-Message gesendet, everybody can unfortunately not Edit can, during The MessageBox the system blockiert.\n\n\nFEHLER!\n\nDie File Blablub.dll watts not found. your selection:" ex#.AnzButtons&=3 'it remaining with 3 self-defined Buttons! The Help-Button becomes automatically added. ex#.HelpButton&=1 'The Help-Button becomes activate. ex#.pHelpProc&=@ProcAddr("pHelpProc",1) 'The Einsprung-address for benutzerdefinierte Help-procedure becomes definiert. ex#.HelpProcParam&=0 'can some self gewählter Parameter his. ex#.ButtonTexts$="Wiederholen|Übergehen|Abbrechen|HILF MIR!!!" 'The Text for Help-Button can however as last Text added. Anderenfalls becomes "Help" using. ex#.DefButton&=3 ex#.TextColor&=@rgb(255,255,255) ex#.BkColor&=@rgb(200,0,0) ex#.Icon&=4 print "Button: "+@st$(@actionbox(ex#)) @ProcAddr("pHelpProc",-1) 'The ProcAddr unlock, because one Perhaps yet others in the program use would like (apiece Parameterzahl there only 5 free burst) '} '{ 'XMessageBoxen ActionBoxReset(ex#) ex#.Caption$="XMessageBoxen" ex#.Text$="circa yet existing code slight on ActionBoxen adjust to, there The procedure »XMessageBox«. These calls intern a ActionBox on, but so, that one the same three Parameter How with the standard-XProfan-MessageBox use can and what's more the same Rückgabewerte sustain. \ one must only »MessageBox« in the code through »XMessageBox« supplant. with the stuff of Values in the structure the ActionBox-Memory-Variable must one itself thereby means not keep busy.\n\n\ These function is naturally on The standard-Buttontexte and -Rückgabewerte dull. but one can with five global variables still The Text- and Backgroundcolor as well as The type spare dial. too The spare programmierbare Hilfeprozedur becomes supported.\n\n\ If one any MessageBoxen in a Program z.B. with a sanften lindgrün How in this Box unterlegt, heave one itself already once vast of almost all others Programs ex.\n\n\ Help finds itself To Beginn the procedure as comments.\n\n\ with this ActionBox watts incidentally the normal windows-standard-Beep as Sound chosen. this sound is a another as the Standardton for the currently chosen Icon." ex#.BkColor&=@rgb(200,220,100) ex#.Icon&=1 ex#.Sound&=15 print "Button: "+@st$(@actionbox(ex#)) '} '{ 'to that Schluss another warning (only a ActionBox to Time) ActionBoxReset(ex#) ex#.Caption$="warning and end the Tutorials" ex#.Text$="to that Schluss another warning:\n\nEs must always only a ActionBox to Time give, otherwise there Variablenkonflikte. this is in the Normalfall at all no trouble. but in the Subclassproc ought to one The ActionBox vorsichtshalber well rather not using.\n\n\ now but plenty Fun with the new Opportunities! who The ActionBox using would like, pack the structure- and Variablendeklarationen as well as The Procedures best in a INC-File. here have I everything one after another lane written, so one einziger \ Sourcecode for publication reicht.\n\nBeste Regards, Jens-Arne\n\nAnregungen and Notes: jreumsc@web.de" ex#.BkColor&=@rgb(255,255,0) ex#.Icon&=3 print "Button: "+@st$(@actionbox(ex#)) '} print:print "to that terminate Button pressing or Click." dispose ex# waitinput end
|
|