Click here to Skip to main content
15,901,205 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Socket Client issue Pin
Jose Lamas Rios10-Aug-05 21:27
Jose Lamas Rios10-Aug-05 21:27 
GeneralRe: Socket Client issue Pin
User 58385210-Aug-05 21:29
User 58385210-Aug-05 21:29 
GeneralRe: Socket Client issue Pin
Jose Lamas Rios10-Aug-05 21:35
Jose Lamas Rios10-Aug-05 21:35 
Generaltoolbar_icon Pin
htv2210-Aug-05 20:31
htv2210-Aug-05 20:31 
GeneralRe: toolbar_icon Pin
Halawlaws10-Aug-05 20:42
Halawlaws10-Aug-05 20:42 
GeneralRe: toolbar_icon Pin
BicycleTheif10-Aug-05 21:01
BicycleTheif10-Aug-05 21:01 
GeneralLarge Icon display in Explorer view Pin
BicycleTheif10-Aug-05 19:59
BicycleTheif10-Aug-05 19:59 
GeneralRe: Large Icon display in Explorer view Pin
Halawlaws10-Aug-05 20:38
Halawlaws10-Aug-05 20:38 
If i understand u correctly u want to add an icon for ur tree component.

U can choose between the two function i worked on before.
the first function is for getting the icon from ur computer(The one specified in the folder option FileTypes Tab)

HICON CMyTreeCtrl::GetIcon(CString pathFileName)
{
// Call SHGetFileInfo to get the icon. Call with dummy filename and
// SHGFI_USEFILEATTRIBUTES flag, so file doesn't actually have to
// exist.
SHFILEINFO shfi;
memset(&shfi,0,sizeof(shfi));
SHGetFileInfo(pathFileName,
FILE_ATTRIBUTE_NORMAL,
&shfi,
sizeof(shfi),
SHGFI_ICON|
SHGFI_USEFILEATTRIBUTES|
SHGFI_SHELLICONSIZE |
SHGFI_SMALLICON);

return shfi.hIcon;
}

And the second one if u want to customizeur own images:
First create the icons then Create an imagelist and do the following

m_imageList.Create(16,16,0,3,2);
m_imageList.SetBkColor(RGB(255,255,255));

HICON hIcon;

hIcon = AfxGetApp()->LoadIcon(IDI_ICON2); //Folder eg
m_imageList.Add(hIcon);

hIcon = AfxGetApp()->LoadIcon(IDI_ICON3); //File eg
m_imageList.Add(hIcon);

m_T.SetImageList(&m_imageList,TVSIL_NORMAL);

I hope this helps

/\|-||\/|/\|)
GeneralRe: Large Icon display in Explorer view Pin
BicycleTheif10-Aug-05 20:54
BicycleTheif10-Aug-05 20:54 
GeneralRe: Large Icon display in Explorer view Pin
Nishad S11-Aug-05 0:55
Nishad S11-Aug-05 0:55 
Generalcustom messages in windows forms app. Pin
Member 341989110-Aug-05 19:43
Member 341989110-Aug-05 19:43 
GeneralRe: custom messages in windows forms app. Pin
ThatsAlok10-Aug-05 20:40
ThatsAlok10-Aug-05 20:40 
GeneralRe: custom messages in windows forms app. Pin
S Douglas10-Aug-05 22:55
professionalS Douglas10-Aug-05 22:55 
GeneralHelp with fseek() Pin
Raza568010-Aug-05 19:26
Raza568010-Aug-05 19:26 
GeneralRe: Help with fseek() Pin
El Corazon10-Aug-05 19:59
El Corazon10-Aug-05 19:59 
GeneralRe: Help with fseek() Pin
Jose Lamas Rios10-Aug-05 20:11
Jose Lamas Rios10-Aug-05 20:11 
GeneralXP System Restore Pin
yqzq10-Aug-05 18:05
yqzq10-Aug-05 18:05 
GeneralRe: XP System Restore Pin
Supriya Tonape23-Aug-05 20:05
Supriya Tonape23-Aug-05 20:05 
GeneralList Subitem Background! Pin
LiYS10-Aug-05 17:59
LiYS10-Aug-05 17:59 
GeneralRe: List Subitem Background! Pin
Jose Lamas Rios10-Aug-05 18:10
Jose Lamas Rios10-Aug-05 18:10 
GeneralRe: List Subitem Background! Pin
LiYS10-Aug-05 18:34
LiYS10-Aug-05 18:34 
GeneralRe: List Subitem Background! Pin
Jose Lamas Rios10-Aug-05 19:54
Jose Lamas Rios10-Aug-05 19:54 
GeneralRe: List Subitem Background! Pin
LiYS10-Aug-05 20:36
LiYS10-Aug-05 20:36 
GeneralRe: List Subitem Background! Pin
LiYS10-Aug-05 20:46
LiYS10-Aug-05 20:46 
GeneralRe: List Subitem Background! Pin
Jose Lamas Rios10-Aug-05 21:17
Jose Lamas Rios10-Aug-05 21:17 

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.