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?