| |
|
|
Georg Hovenbitzer | Hello together,
I have a problem with the Vererben of Structures. I can tappt im dunkeln of course under Profan befüllen and read, but unfortunately schaft it Microsoft not enclosed one code the a Entry in a TreeView power, The Version with the Vererben functions unfortunately not, The without already. CompileMarkSeparation $H Windows.ph
$H Messages.ph
$H commctrl.ph
Def GetSysColor(1) !USER32,GetSysColor
Declare TreeView&
Declare TV_ItemText#
Dim TV_ItemText#,100
## so geht es leider nicht ##
Declare TV_Item#
Struct Tv_Item = Mask&,hItem&,State&,StateMask&,pszText&,cchTextMax&,iImage&,iSelectedImage&,cChildren&,lParam&
Dim TV_Item#,Tv_Item
Declare TV_Insert#
Struct TV_Insert = hParent&,hInsertAfter&,Tv_Item
Dim TV_Insert#,TV_Insert
##
## so klappt es ##
Declare TV_Insert#
Struct TV_Insert = hParent&,hInsertAfter&,Mask&,hItem&,State&,StateMask&,pszText&,cchTextMax&,iImage&,iSelectedImage&,cChildren&,lParam&
Dim TV_Insert#,TV_Insert
##
WindowStyle 2 + 8 + 16 + 128 + 256 + 512
Window 50,50-900,800
Cls GetSysColor(15)
TreeView& = @Control(SysTreeView32,,~WS_Child | ~WS_Visible | ~TVS_HASBUTTONS | ~TVS_HASLINES | ~TVS_LINESATROOT | ~TVS_EDITLABELS | ~TVS_SHOWSELALWAYS | ~TVS_TRACKSELECT | ~TVS_SINGLEEXPAND,80,16,300,400,%hWnd,1,%hInstance,~WS_EX_ClientEdge)
String TV_ItemText#,0 = Hallo + @Chr$(0)
With TV_Insert#
.hParent& = 0
.hInsertAfter& = 0
.Mask& = ~TVIF_TEXT | ~TVIF_CHILDREN | ~TVIF_STATE
.hItem& = 0
.State& = ~TVIS_EXPANDED
.StateMask& = ~TVIS_EXPANDED
.pszText& = TV_ItemText#
.cchTextMax& = 100
.iImage& = 0
.iSelectedImage&= 1
.cChildren& = 1
.lParam& = 1111
EndWith
@SendMessage(TreeView&,~TVM_INSERTITEM,0,TV_Insert#)
WhileNot %Key = 2
WaitInput
EndWhile
Dispose TV_ItemText#
Dispose TV_Insert#
../../references-fonction/XProfan/end/'>End
|
|
|
| Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a) | 09/19/07 ▲ |
|
|
|