| |
|
|
Jörg Sellmeyer |
'this code reads whom Headertext one Tabcontrols from.
'of Jörg Sellmeyer to disengaged Disposal for all
$H commctrl.ph
Struct TC_ITEMHEADER = Mask&,lpReseved1&,lpReseved2&,pszText&,cchTextMax&,iImage&
Declare TC_Item#
Dim TC_Item#, TC_ITEMHEADER
Proc GetTabText
Parameters hTab&,hwnd&,i&
Declare Text#,Text$
Dim Text#,12
With TC_Item#
.cchTextMax& = 24
.Mask& = $0001
.pszText& = Text#
EndWith
SendMessage(hTab&,$01305,i&,TC_Item#)
Text$ = String $(Text#,0)
Dispose Text#
Return Text$
ENDPROC
Proc SetTabText
Parameters hdl&,Id%,txt$
With TC_Item#
.Cchtextmax& = Len(txt$)
.Mask& = $0001
.Psztext& = Addr(txt$)
Endwith
SendMessage(Tab&,~TCM_SETITEM,Id%,TC_Item#)
ENDPROC
Proc SetTabIcon
Parameters hTab&,index%,IconIndex%
Declare TC_Item#
Dim TC_Item#,TC_ITEMHEADER
With TC_Item#
.Mask& = ~TCIF_IMAGE
.iImage& = IconIndex%
EndWith
SendMessage(hTab&,~TCM_SETITEM,index%,TC_Item#)
ENDPROC
Declare Tab&
Cls
var hToolBmp& = create("HPIC", 0, "TOOLBAR")
var hIL& = Create("ImageList", 16, 16, hToolBmp&, rgb(192, 192, 192))
Tab&=Create("Tabctrl",%hWnd,"Test 5",130,30,460,300)
SendMessage(Tab&, ~TCM_SETIMAGELIST, 0, hIL&)
WhileLoop 4,1,-1
InsertTab(Tab&,0,"Test " + Str $(&Loop))
Wend
WhileLoop 0,4
print "Text = " + GetTabText(Tab&,%hwnd,&Loop)
Wend
Randomize
While 1
WaitInput
Case %umessage = 16:Break
If %mousePressed = 0
SetTabText(Tab&,GetActiveTab(Tab&),Str $(&GetTickCount))
SetTabIcon(Tab&,GetActiveTab(Tab&),Rnd(GetCount(hIL&)))
EndIf
Wend
Dispose TC_Item#
|
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 10/01/06 ▲ |
|
|
|
|
Jac de Lad | Wozu should the well his? I mean whom Header can one user Yes not change... |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 10/01/06 ▲ |
|
|
|
|
Jörg Sellmeyer | Jacob Liebeck
Wozu should the well his? I mean whom Header can one user Yes not change...
so can dynamic Tabs create and according to cover unterschiedlicheAktionen perform. Also kannstDu now the user gestatten, The Texts To Change (by Input$() z. B.) |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 10/01/06 ▲ |
|
|
|
|
Jac de Lad | Well, is already clear, becomes still but seeeehr seldom appear, or crazy I? |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 10/02/06 ▲ |
|
|
|
|
Jörg Sellmeyer | Umso rather, if one then white as goes ;) |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 10/02/06 ▲ |
|
|
|
|
Jac de Lad | Yes, clear... |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 10/03/06 ▲ |
|
|
|
|
ByteAttack | OK! then schieß time go: How change I the Please a Text one already existing TabControl-Reiters??? |
|
|
| |
|
|
|
Frank Abbing | with the Message TCM_SETITEM. |
|
|
| |
|
|
|
Jörg Sellmeyer | If always so simply would, but MS machts often unbelievable tricky, b.z.w. are we of Profan so verwöhnt. I habs time supra into code eingefügt. Greeting Jörg |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 10/24/07 ▲ |
|
|
|
|
ByteAttack | Thank you. have me The half-way night whom head zermattert over The MSN-Library and the commctrl.ph. but now have You it Yes reingestellt, and so ne Kleinigkeit mach too me happy! Thank you. |
|
|
| |
|
|
|
Jörg Sellmeyer | code supra repariert and circa function To change the Icons complement. |
|
|
| |
|
|