Images are not visible on tab control
I have written following code,I am able to see tabs but with only text not images
IDB_BITMAP is image of size 96*32;
CImageList ci;
ci.Create(IDB_BITMAP1,32,1,RGB(255,0,0));
m_tab.SetImageList(&ci);
m_tab.InsertItem(1,_T("one"),0);
m_tab.InsertItem(2,_T("two"),1);
m_tab.InsertItem(3,_T("three"),2);
Please help on this issue.
One More Question ,how I can use this tabbed pages,Can I place other controls like button listbox etc on tab,if yes how ?
Re: Images are not visible on tab control
Quote:
Originally Posted by
shivditya
I have written following code,I am able to see tabs but with only text not images
IDB_BITMAP is image of size 96*32;
Code:
CImageList ci;
ci.Create(IDB_BITMAP1,32,1,RGB(255,0,0));
What dose the Create() return?
Quote:
Originally Posted by
shivditya
Code:
...
m_tab.InsertItem(1,_T("one"),0);
m_tab.InsertItem(2,_T("two"),1);
m_tab.InsertItem(3,_T("three"),2);
And what about the tab with index zero?
Quote:
Originally Posted by
shivditya
how I can use this tabbed pages,Can I place other controls like button listbox etc on tab,if yes how ?
You usually place "other controls like button listbox etc" on the dialog, not on the tab itself and then you show a dialog corresponding the tab that user selects...
Another way is to use CPropertySheet with CPropertyPage objects.
Please, read MSDN about using them.