Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to distinguish syslink?
#2
Function dlg_link_test
Code:
Copy      Help
\Dialog_Editor

function# hDlg message wParam lParam
if(hDlg) goto messages

if(!ShowDialog("dlg_link_test" &dlg_link_test 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: "" 0x2030300 "*" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 3 ;;button click
,,_s.getfile("$desktop$\dlg.txt") ;; <a>Google</a> <a>Bing</a>
,,_s.setwintext(id(4 hDlg))
,case 4 ;;link clicked. lParam is 0 for first link, 1 for second, and so on.
,,;out F"lParam = {lParam}"
,,sel lParam
,,,case 0: run "http://www.google.com"
,,,case 1: run "http://www.bing.com"
,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)