Click here to Skip to main content
15,926,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: plz help? Pin
Jeremy Falcon31-Dec-02 10:49
professionalJeremy Falcon31-Dec-02 10:49 
Generaldocument of IE on Win2K Pin
Tili31-Dec-02 8:18
Tili31-Dec-02 8:18 
GeneralRe: document of IE on Win2K Pin
Michael Dunn31-Dec-02 9:11
sitebuilderMichael Dunn31-Dec-02 9:11 
GeneralRe: document of IE on Win2K Pin
Stephane Rodriguez.31-Dec-02 9:18
Stephane Rodriguez.31-Dec-02 9:18 
GeneralRichEdit stream in problem... Pin
RobJones31-Dec-02 7:51
RobJones31-Dec-02 7:51 
GeneralRe: RichEdit stream in problem... Pin
Gary R. Wheeler1-Jan-03 4:18
Gary R. Wheeler1-Jan-03 4:18 
GeneralRe: RichEdit stream in problem... Pin
RobJones1-Jan-03 4:42
RobJones1-Jan-03 4:42 
GeneralTyring to get the icon of the desktop or "My Documents" or... Pin
mynab31-Dec-02 5:18
mynab31-Dec-02 5:18 
Hello,

I am trying to get the icon of those special locations but not the index in the system image list but the icon file and the index in the icon file. I use the following code:

IShellFolder *pshf = NULL;
SHGetDesktopFolder(&pshf);
if (pshf != NULL)
{
void *pv = NULL;
CItemIDList idlist(strPath);
LPCITEMIDLIST apidl = LPCITEMIDLIST(idlist);
HRESULT rc = pshf->GetUIObjectOf(NULL, 1, &apidl, IID_IExtractIcon, NULL, &pv);
if (pv)
{
TCHAR szIconFile[MAX_CHAR];
memset(szIconFile, 0, MAX_CHAR);
INT nIconIndex = 10;
UINT nFlags;
if ( ((IExtractIcon*)pv)->GetIconLocation(GIL_FORSHELL, szIconFile, MAX_CHAR, &nIconIndex, &nFlags) == S_OK
&& strlen(szIconFile) != 0)
{
// we got the solution
return true;
}
}
}

This looks good but it does not work: if strPath is set to a folder then I get the icon 0 of explorer.exe which is not the good one. Most of the time nIconIndex is equal to 0. Can someone help me on this?

Thanks
mynab
GeneralRe: Tyring to get the icon of the desktop or "My Documents" or... Pin
mynab31-Dec-02 23:31
mynab31-Dec-02 23:31 
QuestionTransparent with Mouse Events? Pin
ups31-Dec-02 2:44
ups31-Dec-02 2:44 
AnswerRe: Transparent with Mouse Events? Pin
Mike Nordell31-Dec-02 9:28
Mike Nordell31-Dec-02 9:28 
GeneralRe: Transparent with Mouse Events? Pin
ups31-Dec-02 17:09
ups31-Dec-02 17:09 
GeneralRe: Transparent with Mouse Events? Pin
Mike Nordell1-Jan-03 4:56
Mike Nordell1-Jan-03 4:56 
GeneralRe: Transparent with Mouse Events? Pin
ups1-Jan-03 14:37
ups1-Jan-03 14:37 
GeneralIncrease volume of wav file generated by SAPI. Pin
S.Maharajan31-Dec-02 1:26
S.Maharajan31-Dec-02 1:26 
Generaledk.h / edkguid.lib Pin
skallestad31-Dec-02 1:11
skallestad31-Dec-02 1:11 
GeneralWho can give me a Shell32.dll( 5.0 ) Pin
TianYang31-Dec-02 0:48
TianYang31-Dec-02 0:48 
GeneralRe: Who can give me a Shell32.dll( 5.0 ) Pin
TianYang31-Dec-02 1:31
TianYang31-Dec-02 1:31 
GeneralRe: Who can give me a Shell32.dll( 5.0 ) Pin
Michael Dunn31-Dec-02 7:54
sitebuilderMichael Dunn31-Dec-02 7:54 
GeneralRe: Who can give me a Shell32.dll( 5.0 ) Pin
Jeremy Falcon31-Dec-02 10:52
professionalJeremy Falcon31-Dec-02 10:52 
GeneralRe: Who can give me a Shell32.dll( 5.0 ) Pin
16-Nov-03 19:39
suss16-Nov-03 19:39 
Generalformatting output (CString .Format...) Pin
Joan M31-Dec-02 0:06
professionalJoan M31-Dec-02 0:06 
GeneralRe: formatting output (CString .Format...) Pin
MVH31-Dec-02 0:20
MVH31-Dec-02 0:20 
GeneralIt didn't worked... Pin
Joan M31-Dec-02 0:24
professionalJoan M31-Dec-02 0:24 
GeneralRe: It didn't worked... Pin
MVH31-Dec-02 0:38
MVH31-Dec-02 0:38 

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.