Click here to Skip to main content
13,191,877 members (38,755 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I needed to use application defined data for my tab control. MSDN says if the extra data exceeds 4 bytes I must use my own defined structure instead of TCITEM structure but that the first member of my defined structure must be a TCITEMHEADER structure. These I did. MSDN also specify that I must change the numner of extra bytes per tab by using TCM_SETITEMEXTRA message and that the extra byted should be the difference between the size of my structure and TCITEMHEADER structure. Also, I am supposed to be able to get and set my defined structure using TCM_GETITEM and TCM_SETITEM messages.

I have, to the best of my knowledge , done all this but debugging shows that the other members of my defines structure are neither being set nor got.Only the members of TCITEMHEADER structure are being set and got.I assigned the extra byte in WinMain just after I created the tab control.

What could be wrong?
Perhaps I am getting something wrong. How can I achieve my objective? By that I mean, how do I ensure that the extra bytes per tab is set?
How do I ensure the other members of my structure are set and got.
I noticed that the relevant functions accept pointer to TCITEM structure so I simply passed pointer to my user defined structure and casted it to TCITEM sructure pointer. Could this be the problem?
Posted 9-Jan-13 2:45am
Richard MacCutchan 9-Jan-13 9:09am
You need to either use your debugger to trace through your code to see why it appears not to work, or show some of your code so that people can try and see what may be happening. Please edit your question and add some detail, not forgetting to put your code between <pre> tags.
nv3 9-Jan-13 9:41am
Make sure you specify TCIF_PARAM in the mask word of your TCM_ITEMHEADER derived structure.
Michael Haephrati 3-Mar-13 14:11pm
Could you place here some of the source code in question?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171017.2 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100