| |
|
|
Georg Hovenbitzer | allô zusammen,
j'ai un Problem avec dem Vererben de Strukturen. je peux vous zwar sous Profan befüllen et auslesen, mais malheureusement schaft es Microsoft pas Anbei un Code qui une Eintrag dans un TreeView pouvoir, qui Version avec dem Vererben funktioniert malheureusement pas, qui sans déjà. KompilierenMarqueSéparation $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/'>Fin
|
|
|
| Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a) | 19.09.2007 ▲ |
|
|
|