| |
|
|
 Hans Hermann | Hi, I Search a simple XProfan-Solution, in a Messagebox (Imprint) another Website and a Mailadresse to house as underlined-Solution, not as Button.
Vielen Thanks! Hans |
|
|
| |
|
|
|
 | there helps MessageBoxIndirect [...] with Examples [...] and [...] , Link vlt. by [...] .
If you the zusammenbekommen have, then had I the too gladly. |
|
|
| |
|
|
|
 Rolf Koch | Tja Hans, who my Object Creator uses, the wisely How simply its  |
|
|
| |
|
|
|
 Andreas Miethe
 | Per Hook goes a crowd 
$H windows.ph
$H Messages.ph
Struct CWPSTRUCT = lParam&,wParam&,message&,hwnd&
Struct Rect = left&,top&,right&,bottom&
#############################
Messagebox-Konstanten
DEF &IDOK 1
DEF &IDCANCEL 2
DEF &IDABORT 3
DEF &IDRETRY 4
DEF &IDIGNORE 5
DEF &IDYES 6
DEF &IDNO 7
DEF &IDHELP 9
DEF &IDTRYAGAIN 10
DEF &IDCONTINUE 11
DEF &IDICON 20
DEF &IDPROMPT $FFFF
DEF &IDSTATIC $CAFE
#############################
Proc MB
Parameters wnd&,msg&,wparam&,lparam&
Declare Result&,W&,H&,b&
Result& = ~CallWindowProc(OldProc&,wnd&,msg&,wparam&,lparam&)
select msg&
Caseof ~WM_INITDIALOG
Var SRect# = New(Rect)
~GetWindowRect(wnd&,SRect#)
dialog vergrössern and Center
W& = SRect#.right& - SRect#.left&
H& = SRect#.bottom& -SRect#.top& + 40
~Movewindow(wnd&,((%maxx/2)-(W&/2)),((%maxy/2)-(H&/2)),W&,H&,1)
positions the Controls 40 Pixel to untern verchieben
~Getwindowrect(~GetDlgItem(wnd&,&IDSTATIC),SRect#)
~Mapwindowpoints(0,wnd&,SRect#,2)
~Movewindow(~GetDlgItem(wnd&,&IDSTATIC),0,SRect#.Top&+40,SRect#.Right&,SRect#.Bottom&,1)
Whileloop 1,11
If ~IsWindow(~GetDlgItem(wnd&,&Loop))
~Getwindowrect(~GetDlgItem(wnd&,&Loop),SRect#)
~Mapwindowpoints(0,wnd&,SRect#,2)
~Setwindowpos(~GetDlgItem(wnd&,&Loop),0,SRect#.Left&,SRect#.Top&+40,0,0,~SWP_NOSIZE | ~SWP_NOZORDER)
Endif
Endwhile
position of PROMPT fetch
~Getwindowrect(~GetDlgItem(wnd&,&IDPROMPT),SRect#)
~Mapwindowpoints(0,wnd&,SRect#,2)
LINKS under PROMPT lay out
Link& = Control("SysLink","<a>Besuch my Homepage</a>",$50000000,SRect#.Left&,SRect#.Bottom&+10,width(wnd&),18,wnd&,4000,0,0)
SendMessage(Link&,~WM_SETFONT,~GetStockObject(~ANSI_VAR_FONT),1)
Mail& = Control("SysLink","<a>Schick me Mail</a>",$50000000,SRect#.Left&,SRect#.Bottom&+30,width(wnd&),18,wnd&,4001,0,0)
SendMessage(Mail&,~WM_SETFONT,~GetStockObject(~ANSI_VAR_FONT),1)
Dispose SRect#
Result& = 1
Caseof ~WM_NOTIFY
Link inquire
If (Long(lparam&,8) = -2) and (Long(lParam&,0) = LINK&)
ShellExec("https://www.ampsoft.eu","open",~SW_SHOWNORMAL)
endif
If (Long(lparam&,8) = -2) and (Long(lParam&,0) = Mail&)
ShellExec("Mailto://","open",~SW_SHOWNORMAL)
endif
Result& = 1
Caseof ~WM_NCDESTROY
~UnhookWindowsHookEx(Hook&)
Result& = 1
Endselect
Return Result&
Endproc
Proc SetHook
Parameters nCode&, wParam&, lParam&
Select nCode&
Caseof ~HC_ACTION
Var pw# = New(CWPSTRUCT)
pw# = lparam&
If pw#.message& = ~WM_INITDIALOG
OldProc& = ~SetWindowlong(pw#.hwnd&,~GWL_WNDPROC,ProcAddr("MB",4))
Dispose pw#
Endif
EndSelect
Return ~CallNextHookEx(Hook&, nCode&, wParam&, lParam&)
ENDPROC
Proc PRF_Messagebox
Set("Fastmode",1)
Parameters body$, title$, flags&
Declare Result&
Hook& = ~SetWindowsHookEx(~WH_CALLWNDPROC, ProcAddr("SetHook",3), 0,~GetCurrentThreadId())
Result& = MessageBox(title$,body$, flags&)
Set("Fastmode",0)
Return Result&
ENDPROC
here GEHTS go
Declare Hook&,OldProc&
Declare LINK&,Mail&
cls
Print PRF_Messagebox("Eine question...","Wirklich delete ?",~MB_YESNOCANCEL | ~MB_DEFBUTTON2 | ~MB_ICONQUESTION | ~MB_APPLMODAL)
Waitinput
|
|
|
| Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...]  | 02/06/10 ▲ |
|
|
|
|
 Frank Abbing | The background is correct not yet integrally. |
|
|
| |
|
|
|
 Andreas Miethe
 | How to the background because looks ? |
|
|
| Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...]  | 02/06/10 ▲ |
|
|
|
|
 Frank Abbing | works comic, if it under again knows becomes. The Linktext ought to Perhaps rather under the Icon stand. |
|
|
| |
|
|
|
 Andreas Miethe
 | the can Yes eachone adjust How it it would like ( with WM_INITDIALOG ) z.B. in Schweinchenrosa  |
|
|
| Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...]  | 02/06/10 ▲ |
|
|
|
|
 Frank Abbing | Schweinchenrosa is very correctly., thanks!  |
|
|
| |
|
|
|
 Andreas Miethe
 | OK, I have obigen code so changed, that The left now under the speedy and over the Butons showing. |
|
|
| Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...]  | 02/07/10 ▲ |
|
|
|
|
 Frank Abbing | the looks really well from, Andreas!  |
|
|
| |
|
|
|
 E.T. | class !! but Why must because the pink pig ever his ??? with us (former) in the barn were the ever dirty , having but nevertheless tasted...  |
|
|
| Grüße aus Sachsen... Mario WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte... | 02/08/10 ▲ |
|
|
|