Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - How to set Dynamic Icon in Tabs ?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to set Dynamic Icon in Tabs ?

 Post Reply Post Reply
Author
Message Reverse Sort Order
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Topic: How to set Dynamic Icon in Tabs ?
    Posted: 11 May 2010 at 7:01am
Hi;

You have to dynamically add icons to a CImageList object and then assign this CImageList to the tab control.
Then use SetImageIndex to assign the icons.
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017
Back to Top
shanmuganathan View Drop Down
Groupie
Groupie
Avatar

Joined: 01 December 2006
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote shanmuganathan Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2010 at 6:54am
Hi,

It would be great if you could provide me a sample. I tried to doing the following but i am not getting the icons in tab.

CXTPImageManager* pImageManager = NULL;
CSize size;
size.SetSize( 8, 8 );
pImageManager->SetIconFromIcoFile( "Sample.ico", 1, size, xtpImageNormal );
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2010 at 2:44am
Hi;

Try CXTPTabManagerItem::SetImageIndex() instead.
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017
Back to Top
shanmuganathan View Drop Down
Groupie
Groupie
Avatar

Joined: 01 December 2006
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote shanmuganathan Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2010 at 1:36am
Hi Friends,

I am implementing TabControl for my SDI application. I need to know how to do the following item using CXTPTabControl.

1) I need to set icons in my TabControl dynamically. Meaning if i open google or codejock webpage i need to get its corresponding icons in tab?

I tried using this member function called ShowIcons provided by CXTPTabControl. But of no use.

I am using Xtreme ToolkitPro v12.1.1 version. And my IDE is VS2008.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.