Click here to Skip to main content
15,886,823 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionThird time I am posting please annswer Pin
shivditya6-Nov-05 17:08
shivditya6-Nov-05 17:08 
AnswerRe: Third time I am posting please annswer Pin
Christian Graus6-Nov-05 17:38
protectorChristian Graus6-Nov-05 17:38 
QuestionRe: Third time I am posting please annswer Pin
shivditya6-Nov-05 19:25
shivditya6-Nov-05 19:25 
AnswerRe: Third time I am posting please annswer Pin
Christian Graus7-Nov-05 9:01
protectorChristian Graus7-Nov-05 9:01 
AnswerRe: Third time I am posting please annswer Pin
kakan6-Nov-05 19:56
professionalkakan6-Nov-05 19:56 
AnswerRe: Third time I am posting please annswer Pin
David Crow7-Nov-05 3:08
David Crow7-Nov-05 3:08 
Question32 or 16 bit color icons for Visual C++ 6.0 Pin
haputanlas6-Nov-05 13:16
haputanlas6-Nov-05 13:16 
AnswerRe: 32 or 16 bit color icons for Visual C++ 6.0 Pin
LighthouseJ6-Nov-05 17:23
LighthouseJ6-Nov-05 17:23 
Now, I have VS .NET 2002 so I'm not sure this works for you. I recently started working with CTreeCtrl's and I needed two custom icons. I created them in MS Paint, saved as 16x16 24-bit bitmaps. I imported them into my project via the resource view, they showed up under the category "Bitmaps", one called IDB_FILE and another called IDB_FOLDER. For the CTreeCtrl, to use icons, I have to load up a CImageList data type with my images, then attach it to the CTreeCtrl. This is the resulting code in regards to the CImageList, I don't know how helpful it was but it did the job fine for me:

m_images.Create(16, 16, ILC_COLOR24 | ILC_MASK, 0, 2);<br />
<br />
CBitmap folder;<br />
ASSERT(folder.LoadBitmap(IDB_FOLDER));<br />
ASSERT(m_images.Add(&folder, RGB(0, 255, 128)) != -1);<br />
<br />
CBitmap file;<br />
ASSERT(file.LoadBitmap(IDB_FILE));<br />
ASSERT(m_images.Add(&file, RGB(0, 255, 128)) != -1);<br />
<br />
m_tree.SetImageList(&m_images, TVSIL_NORMAL);


Note, m_images is the CImageList and m_tree is the CTreeCtrl.

I also implemented a mask so the background of the control can be changed and the icons' picture will change appropriately. I painted the RGB color 0, 255, 128 on the image where I want transparency then on the Add() command, I specify what color the mask color is. Again, I don't know how helpful this is to your project but good luck.
GeneralRe: 32 or 16 bit color icons for Visual C++ 6.0 Pin
haputanlas6-Nov-05 19:03
haputanlas6-Nov-05 19:03 
AnswerRe: 32 or 16 bit color icons for Visual C++ 6.0 Pin
ThatsAlok6-Nov-05 17:29
ThatsAlok6-Nov-05 17:29 
AnswerRe: 32 or 16 bit color icons for Visual C++ 6.0 Pin
Taka Muraoka7-Nov-05 0:17
Taka Muraoka7-Nov-05 0:17 
QuestionHBITMAPS and pixels Pin
BBJ_NYC6-Nov-05 9:33
BBJ_NYC6-Nov-05 9:33 
AnswerRe: HBITMAPS and pixels Pin
Ravi Bhavnani6-Nov-05 11:40
professionalRavi Bhavnani6-Nov-05 11:40 
AnswerRe: HBITMAPS and pixels Pin
Christian Graus6-Nov-05 12:01
protectorChristian Graus6-Nov-05 12:01 
GeneralRe: HBITMAPS and pixels Pin
Jörgen Sigvardsson6-Nov-05 12:21
Jörgen Sigvardsson6-Nov-05 12:21 
QuestionIsKindOf detection Pin
LighthouseJ6-Nov-05 7:30
LighthouseJ6-Nov-05 7:30 
AnswerRe: IsKindOf detection Pin
Ravi Bhavnani6-Nov-05 9:22
professionalRavi Bhavnani6-Nov-05 9:22 
AnswerRe: IsKindOf detection Pin
S. Senthil Kumar7-Nov-05 2:22
S. Senthil Kumar7-Nov-05 2:22 
QuestionLoading resources? Pin
Lord Kixdemp5-Nov-05 23:12
Lord Kixdemp5-Nov-05 23:12 
AnswerRe: Loading resources? Pin
BadKarma5-Nov-05 23:21
BadKarma5-Nov-05 23:21 
AnswerRe: Loading resources? Pin
qfegd6-Nov-05 1:43
qfegd6-Nov-05 1:43 
AnswerRe: Loading resources? Pin
Ravi Bhavnani6-Nov-05 2:29
professionalRavi Bhavnani6-Nov-05 2:29 
GeneralRe: Loading resources? Pin
Lord Kixdemp6-Nov-05 9:11
Lord Kixdemp6-Nov-05 9:11 
GeneralRe: Loading resources? Pin
Ravi Bhavnani6-Nov-05 9:17
professionalRavi Bhavnani6-Nov-05 9:17 
GeneralRe: Loading resources? Pin
Lord Kixdemp6-Nov-05 9:42
Lord Kixdemp6-Nov-05 9:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.