English
Forum

TCItem-structure for TabControl

 
- Page 1 -



Jac
de
Lad
Hello Community.

can someone The TCItem-structure for Tabcontrols post? i will in Tabcontrols Icons insert. moreover need I the structure. I habs with
CompileMarkSeparation
Struct TCItem=mask&,dwState&,dwStateMask&,lpreserved1&,lpreserved2&,pszText&,cchTextMax&,iImage&,lParam&
>

probiert, but it not working. I set The Imagelist, read one Item with TCM_GetItem, set the iImage& and write it back with TCM_SetItem, but it works not.
Perhaps has Yes someone a vorgefertigten View source, the would me very help on.

Jac
 
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
01/06/08  
 



« this Posting watts as Solution marked. »


Jörg
Sellmeyer
and the Reparaturdienst is again on the way...
 $H windows.ph
 $H messages.ph
 $H commctrl.ph
 $H structs.ph
Struct TCItem = mask&,\
dwState&,\
dwStateMask&,\
pszText&,\
cchTextMax&,\
iImage&,\
lParam&
CLS
var TCItem# = New(TCItem)
var TabCtrl& = create("TabCtrl", %HWnd, "Test", 300, 10, 200, 200)
'we Change whom Text of tab 0 (= 1. tab) by API
var NeuText$ = "Hallo Jac!"

with TCItem#

    .mask& = ~TCIF_TEXT'What is To write or. To reading
    .pszText& = Addr(NeuText$)
    .cchTextMax& = 255

endwith

waitInput
SendMessage(TabCtrl&, ~TCM_SETITEM, 0, TCItem#)
waitInput
'well then fügen we a Imgelist hinzu ...
var hToolBmp& = create("HPIC", 0, "TOOLBAR")
var hIL& = Create("ImageList", 16, 16, hToolBmp&, rgb(192, 192, 192))
SendMessage(TabCtrl&, ~TCM_SETIMAGELIST, 0, hIL&)
'... and point the 1. tab (tab 0) one Image To)

with TCItem#

    .mask& = ~TCIF_IMAGE'What is To write or. To reading
    .iImage& = 20'the 20. Image

endwith

print ~TCIF_IMAGE
SendMessage(TabCtrl&, ~TCM_SETITEM, 0, TCItem#)
waitinput
waitinput
waitinput
dispose TCItem#
end

my Strukturdefinition wished too first not. I had fälschlicherweise adopted, iImage and cchTextMax seien Integer. well, that one here quick time nachschauen can.
 
XProfan X4
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/23/18  
 




RGH
Hi,
so sees The Strukturdefinition by me in the API-Help from:
CompileMarkSeparation
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
01/06/08  
 




Jac
de
Lad
I habs already without The Reservisten erfolglos probiert...
 
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
01/07/08  
 




Jac
de
Lad
Ahh, habs finally rausgefunden. I werds tonight times for any post.
 
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
01/07/08  
 




RGH
OK, here complete example. first becomes the Text with SET_ITEM changed and in the second step one Image of/ one ImageList added:
CompileMarkSeparation
 $H windows.ph
 $H messages.ph
 $H commctrl.ph
 $H structs.ph
Struct TCItem = mask&,
dwState&,
dwStateMask&,
pszText&,
cchTextMax&,
iImage&,
lParam&
CLS
var TCItem# = New(TCItem)
var TabCtrl& = create(TabCtrl, %HWnd, Test, 300, 10, 200, 200)
Wir ändern den Text von Tab 0 (= 1. Reiter) per API
var NeuText$ = Hallo Jac!

with TCItem#

    .mask& = ~TCIF_TEXT      Was ist zu schreiben bzw. zu lesen
    .pszText& = Addr(NeuText$)
    .cchTextMax& = 255

endwith

SendMessage(TabCtrl&, ~TCM_SETITEM, 0, TCItem#)
waitInput
Und nun fügen wir eine Imgelist hinzu ...
var hToolBmp& = create(hPic, 0, TOOLBAR)
var hIL& = Create(ImageList, 16, 16, hToolBmp&, rgb(192, 192, 192))
SendMessage(TabCtrl&, ~TCM_SETIMAGELIST, 0, hIL&)
... und weisen dem 1. Reiter (Tab 0) ein Bild zu)

with TCItem#

    .mask& = ~TCIF_IMAGE      Was ist zu schreiben bzw. zu lesen
    .iImage& = 20             das 20. Bild

endwith

SendMessage(TabCtrl&, ~TCM_SETITEM, 0, TCItem#)
waitinput
dispose TCItem#
end

the ought to you help on.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
01/07/08  
 




Jac
de
Lad
Oach menno, I seat here hours around the rauszukriegen and if I write, that ichs Have, posting Roland here quick what ex. this is so deprimierend. but Hauptsache It's all right now.
 
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
01/07/08  
 




RGH
Jac
Oach menno, I seat here hours around the rauszukriegen and if I write, that ichs Have, posting Roland here quick what ex. this is so deprimierend. but Hauptsache It's all right now.


first after I the Beispielprogramm adjusted and posted having, have I your mail seen, you were hold a couple minutes faster! ;)

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
01/07/08  
 




Jac
de
Lad
then mach I even one Codesnippet with icons, SetActiveTab etc., so we everything beieinander having. and ne Own Containerfunktion kreiere so did i yet, hehehe.
 
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
01/07/08  
 




Jörg
Sellmeyer
To Rolands example ought to one but moreover write, that it first ex XProfan11 runs!
@Jac: Schreib still one Bsp., the a Api-Imagelist uses, for previous versions.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
01/07/08  
 




Jac
de
Lad
Hm, there would itself one eigener Imagelist-Thread lohnen...
 
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
01/07/08  
 




Jörg
Sellmeyer
and the Reparaturdienst is again on the way...
 $H windows.ph
 $H messages.ph
 $H commctrl.ph
 $H structs.ph
Struct TCItem = mask&,\
dwState&,\
dwStateMask&,\
pszText&,\
cchTextMax&,\
iImage&,\
lParam&
CLS
var TCItem# = New(TCItem)
var TabCtrl& = create("TabCtrl", %HWnd, "Test", 300, 10, 200, 200)
'we Change whom Text of tab 0 (= 1. tab) by API
var NeuText$ = "Hallo Jac!"

with TCItem#

    .mask& = ~TCIF_TEXT'What is To write or. To reading
    .pszText& = Addr(NeuText$)
    .cchTextMax& = 255

endwith

waitInput
SendMessage(TabCtrl&, ~TCM_SETITEM, 0, TCItem#)
waitInput
'well then fügen we a Imgelist hinzu ...
var hToolBmp& = create("HPIC", 0, "TOOLBAR")
var hIL& = Create("ImageList", 16, 16, hToolBmp&, rgb(192, 192, 192))
SendMessage(TabCtrl&, ~TCM_SETIMAGELIST, 0, hIL&)
'... and point the 1. tab (tab 0) one Image To)

with TCItem#

    .mask& = ~TCIF_IMAGE'What is To write or. To reading
    .iImage& = 20'the 20. Image

endwith

print ~TCIF_IMAGE
SendMessage(TabCtrl&, ~TCM_SETITEM, 0, TCItem#)
waitinput
waitinput
waitinput
dispose TCItem#
end

my Strukturdefinition wished too first not. I had fälschlicherweise adopted, iImage and cchTextMax seien Integer. well, that one here quick time nachschauen can.
 
XProfan X4
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/23/18  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

10.186 Views

Untitledvor 0 min.
Sven Bader03/13/23
Normann Strübli02/01/23
RudiB.09/15/22
Stringray01/05/22
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie