用SendMessage 向外部treeView发送 $WM_NOTIFY消息?
Local $tNMHDR=DllStructCreate($tagNMHDR);Global Const $tagNMHDR = "struct; hwnd hWndFrom;uint_ptr IDFrom;INT Code; endstruct"DllStructSetData($tNMHDR, "hwnd", $WinHwnd)
DllStructSetData($tNMHDR, "IDFrom",$IDFrom)
DllStructSetData($tNMHDR, "Code", $TVN_SELCHANGEDA)
;Global Const $tagNMTREEVIEW = $tagNMHDR & ";uint Action;" & _
; "struct; uint OldMask;handle OldhItem;uint OldState;uint OldStateMask;" & _
; "ptr OldText;int OldTextMax;int OldImage;int OldSelectedImage;int OldChildren;lparam OldParam; endstruct;" & _
; "struct; uint NewMask;handle NewhItem;uint NewState;uint NewStateMask;" & _
; "ptr NewText;int NewTextMax;int NewImage;int NewSelectedImage;int NewChildren;lparam NewParam; endstruct;" & _
; "struct; long PointX;long PointY; endstruct"
Local $tNM_TREEVIEW= DllStructCreate($tagNMTREEVIEW)
DllStructSetData($tNM_TREEVIEW, "$tagNMHDR", $tNMHDR)
DllStructSetData($tNM_TREEVIEW, "NewhItem", $aryItemHwnd)
DllStructSetData($tNM_TREEVIEW, "Action", $TVN_SELCHANGEDA)
_SendMessage( $WinHwnd, $WM_NOTIFY, $IDFrom,$tNM_TREEVIEW)前面的DllStructSetData($tNM_TREEVIEW, "$tagNMHDR", $tNMHDR) 这个语句对吗?如何向在结构中的结构SetData呢?
页:
[1]