Click here to Skip to main content
15,899,124 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help with searching for things in text files. Pin
Joe Woodbury15-Nov-03 18:50
professionalJoe Woodbury15-Nov-03 18:50 
General_CrtIsValidHeapPointer Pin
DougW4815-Nov-03 11:26
DougW4815-Nov-03 11:26 
GeneralWindows Explorer Pin
harsh91115-Nov-03 9:54
harsh91115-Nov-03 9:54 
GeneralRe: Windows Explorer Pin
Peter Molnar15-Nov-03 14:51
Peter Molnar15-Nov-03 14:51 
GeneralRe: Windows Explorer Pin
harsh91115-Nov-03 19:24
harsh91115-Nov-03 19:24 
GeneralRe: Windows Explorer Pin
Prakash Nadar15-Nov-03 19:51
Prakash Nadar15-Nov-03 19:51 
GeneralHTML default document icon Pin
alex.barylski15-Nov-03 8:40
alex.barylski15-Nov-03 8:40 
GeneralRe: HTML default document icon Pin
Peter Molnar15-Nov-03 14:28
Peter Molnar15-Nov-03 14:28 
1.
The path to the file containing the HTML icon can be found in the default value of the foloowing registry key:
HKEY_CLASSES_ROOT\htmlfile\DefaultIcon 


which usually "C:\Program Files\Internet Explorer\iexplore.exe,1", that is the first icon stored in the iexplore.exe. You can extract it from there.

2.
Take a screenshoot of windows explorer when it shows an HTML file, and add this bitmap to your project.

3.
Alternatively you can feed an CImageList with all the default icons, among others with the html default icon:
HIMAGELIST  hSystemImageList;
SHFILEINFO    ssfi;

hSystemImageList = (HIMAGELIST)SHGetFileInfo((LPCTSTR)_T("c:\\"),0,&ssfi,sizeof(SHFILEINFO),SHGFI_SYSICONINDEX | SHGFI_ICON);

m_ImageList.Attach(hSystemImageList);
    pListCtrl->SetImageList(&m_ImageList,LVSIL_NORMAL);

And to find a path's index in the ImageList:
SHGetFileInfo((LPCTSTR)sPathToYourFile,0,&sfi,sizeof(SHFILEINFO),SHGFI_SYSICONINDEX | SHGFI_ICON );
pListCtrl->InsertItem(nInsertPos,sPathToYourFile,sfi.iIcon);

where sPathToYourFile should contain a valid path to an html file.



Peter Molnar
GeneralRe: HTML default document icon Pin
alex.barylski15-Nov-03 14:38
alex.barylski15-Nov-03 14:38 
QuestionHow to duplicate an object? Pin
Atlence15-Nov-03 7:46
Atlence15-Nov-03 7:46 
AnswerRe: How to duplicate an object? Pin
Jeryth15-Nov-03 8:15
Jeryth15-Nov-03 8:15 
AnswerRe: How to duplicate an object? Pin
Tim Smith15-Nov-03 8:18
Tim Smith15-Nov-03 8:18 
GeneralRe: How to duplicate an object? Pin
Jeryth15-Nov-03 8:27
Jeryth15-Nov-03 8:27 
GeneralRe: How to duplicate an object? Pin
Anonymous15-Nov-03 9:17
Anonymous15-Nov-03 9:17 
GeneralMFC serialization fails from COM Pin
DimkaSPB15-Nov-03 7:44
DimkaSPB15-Nov-03 7:44 
GeneralChat Server&Client Protocol + how2tx/rx question?! Pin
[ Jûroehn ]15-Nov-03 7:35
[ Jûroehn ]15-Nov-03 7:35 
GeneralRe: Chat Server&Client Protocol + how2tx/rx question?! Pin
Peter Molnar15-Nov-03 14:07
Peter Molnar15-Nov-03 14:07 
GeneralDirectShow (DirectX) on CD Pin
TFB15-Nov-03 7:32
TFB15-Nov-03 7:32 
GeneralRe: DirectShow (DirectX) on CD Pin
Jeryth15-Nov-03 8:23
Jeryth15-Nov-03 8:23 
GeneralRe: DirectShow (DirectX) on CD Pin
TFB15-Nov-03 10:41
TFB15-Nov-03 10:41 
GeneralProblems with PI Pin
Jeryth15-Nov-03 7:08
Jeryth15-Nov-03 7:08 
GeneralRe: Problems with PI Pin
Kevin McFarlane15-Nov-03 10:13
Kevin McFarlane15-Nov-03 10:13 
GeneralRe: Problems with PI Pin
Antti Keskinen15-Nov-03 15:02
Antti Keskinen15-Nov-03 15:02 
GeneralJust bought a PocketPC, however, I need help here. Pin
Link260015-Nov-03 3:21
Link260015-Nov-03 3:21 
GeneralRe: Just bought a PocketPC, however, I need help here. Pin
Mike Dimmick15-Nov-03 3:32
Mike Dimmick15-Nov-03 3:32 

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.