how to use the CXTPTablControl |
Post Reply |
Author | |
henryzc
Newbie Joined: 29 June 2004 Status: Offline Points: 1 |
Post Options
Thanks(0)
Posted: 30 June 2004 at 12:07am |
i just want to use this control in my dialog application,but how?is there anyone can help me?thanks
|
|
ICBM
Groupie Joined: 15 January 2004 Location: New Zealand Status: Offline Points: 57 |
Post Options
Thanks(0)
|
Isn't there a TabControl sample application ? I'm sure there is...
|
|
garand
Newbie Joined: 11 May 2004 Status: Offline Points: 9 |
Post Options
Thanks(0)
|
Hmmm.. doesn't look like the CodeJock people are monitoring this forum. I would also like to know about the CXTPTabControl. There is a class for it but it is barely documented and the samples all seem to be for the CXTTabControl (not the pro, but the old one). I am going to dig into it on my own, but the lack of info doesn't fill me with confidence.
|
|
ddyer
Groupie Joined: 01 December 2003 Location: United States Status: Offline Points: 40 |
Post Options
Thanks(0)
|
I use it (CXTPTabControl) extensively. What do you want to know? Edited by ddyer |
|
garand
Newbie Joined: 11 May 2004 Status: Offline Points: 9 |
Post Options
Thanks(0)
|
Basically, I just want to know... can I just derive a class from CXTPTabControl and use it just like CXTTabControl or any other tab control? Or more directly -- is there some other base class that I use?
Can I give it the Excel/OneNote/.NET look with or without OneNote colors? |
|
ddyer
Groupie Joined: 01 December 2003 Location: United States Status: Offline Points: 40 |
Post Options
Thanks(0)
|
I derived a class from CXTPTabControl and while the APIs don't line up, it is very similar. You add a view to create a tab, etc. Don't forget you have to manually delete views if you remove them from a tab. Get to know CXTPTabManagerItem very well. You will walk and manipulate the CXTPTabControl's tabs as elements of CXTPTabManagerItem's. Familiar APIs include: InsertItem I never was able to roll in CXTPTabClientWnd's sexy tab groups because it is tightly intertwined with MDI and CXTPMDIFrameWnd, and Im an SDI-based app. If you are able to include tab groups, please post.
|
|
garand
Newbie Joined: 11 May 2004 Status: Offline Points: 9 |
Post Options
Thanks(0)
|
I got the CXTPTabConrol to work as a stand-alone tab control -- even with the fancy colors and Excel/Visual Studio/OneNote appearance. However I can't figure out how to get my parent window to be notified when the tab selection changes. It seems to send a WM_NOTIFY but I can figure out what is in the wParam and lParam values are. Any help?
|
|
ddyer
Groupie Joined: 01 December 2003 Location: United States Status: Offline Points: 40 |
Post Options
Thanks(0)
|
Im sure there is more than one way to do that, but in my subclass, I overrode "OnItemClick", which is called whenever a tab is clicked. My method of course then does any specific noficiations. I also override OnNavigateButtonClick to catch the user closing a tab (check out XTP_TABMANAGER_BUTON_CLOSE) . |
|
garand
Newbie Joined: 11 May 2004 Status: Offline Points: 9 |
Post Options
Thanks(0)
|
Thanks, that works. Just one more question -- How do I refresh the tab control after I change appearance attributes. Calling InvalidateRect or Redraw doesn't work quite right (the tabs are out of alignment).
|
|
ddyer
Groupie Joined: 01 December 2003 Location: United States Status: Offline Points: 40 |
Post Options
Thanks(0)
|
You mean appearance attributes of the view the tab manages or the actual tabs themselves? Your redraw/invalidaterect calls may only be affecting the small rectangle that holds the tabs themselves. To change attributes of the tabs, I stick with the APIs (SetCaption(), SetTooltip(), etc). If you are having a hard time getting an effect, try a sledge hammer and see what happens: MyTabManager->GetParent()->Invalidate(); I went back and looked at the view code for the views I assign to the tabs and don't bother with any redraws or invalidates.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |