Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to distinguish syslink?
#4
Thank you for answer.
I'll turn the question.

For example:
out "%i %s" di.item.iItem di.item.pszText
%i -> 0 or 1 output but %s-> empty string
How clicking get link name?


Function dlg_link_test2
Code:
Copy      Help
\Dialog_Editor

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;4 SysLink 0x54030000 0x0 32 12 96 13 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040202 "*" "" "" ""

if(!ShowDialog(dd &sub.DlgProc 0)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,_s.getfile("$desktop$\dlg.txt")
,_s.setwintext(id(4 hDlg))

,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_NOTIFY goto messages3

ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
;messages3
NMHDR* nh=+lParam
sel nh.idFrom
,case 4 ;;syslink control
,NMLVDISPINFO* di=+nh
,sel nh.code
,,case [NM_CLICK,NM_RETURN] ;;link click or Enter
,,,out "lParam=%i TEXT=%s" di.item.iItem di.item.pszText


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)