08-15-2010, 05:11 AM
Function dlg_link
\Dialog_Editor
;SysLink control.
;The control shows text with internet links (hyperlinks). These links can open web pages, files, or execute any other code.
;The control is unavailable on Windows 2000.
function# hDlg message wParam lParam
if(hDlg) goto messages
if(!ShowDialog("dlg_link" &dlg_link 0)) ret
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 Button 0x54032000 0x0 4 6 48 14 "Button"
;4 SysLink 0x54030000 0x0 66 6 130 12 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030208 "*" "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,_s="No Website"
,_s.setwintext(id(4 hDlg))
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_NOTIFY goto messages3
ret
;messages2
sel wParam
,case 3 ;;button click
,_s="Link to <a>Google</a>"
,_s.setwintext(id(4 hDlg))
,
,case IDOK
,case IDCANCEL
ret 1
;messages3
NMHDR* nh=+lParam
sel nh.idFrom
,case 4 ;;syslink control
,sel nh.code
,,case [NM_CLICK,NM_RETURN] ;;link click or Enter
,,run "http://www.google.com"