Click here to Skip to main content
15,911,317 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: CMFCMaskedEdit class Pin
«_Superman_»13-Mar-12 17:08
professional«_Superman_»13-Mar-12 17:08 
AnswerRe: CMFCMaskedEdit class Pin
Randor 13-Mar-12 17:43
professional Randor 13-Mar-12 17:43 
Questionc++ win32 Listview, File List, show folder and app icon using SHGetFileInfo Pin
jkirkerx13-Mar-12 7:59
professionaljkirkerx13-Mar-12 7:59 
QuestionRe: c++ win32 Listview, File List, show folder and app icon using SHGetFileInfo Pin
enhzflep13-Mar-12 13:35
enhzflep13-Mar-12 13:35 
AnswerRe: c++ win32 Listview, File List, show folder and app icon using SHGetFileInfo Pin
jkirkerx13-Mar-12 16:14
professionaljkirkerx13-Mar-12 16:14 
GeneralRe: c++ win32 Listview, File List, show folder and app icon using SHGetFileInfo Pin
enhzflep13-Mar-12 16:58
enhzflep13-Mar-12 16:58 
JokeRe: c++ win32 Listview, File List, show folder and app icon using SHGetFileInfo Pin
jkirkerx13-Mar-12 17:45
professionaljkirkerx13-Mar-12 17:45 
AnswerWell that took a couple of hours to figure out Pin
jkirkerx14-Mar-12 12:07
professionaljkirkerx14-Mar-12 12:07 
Worked on it for a couple of hours today. Documentation at MSDN is pretty vague, and got just 1 response off some post I made for help. Looks like SHGetFileInfo is very flexible in it's use, and can be used a dozen different ways.

I didn't see a pre-fabricated control or class in the toolbox, so I made this from scratch the hard way. So far so good.

If I'm completely off base here, just let me know. I might ditch the SHFILEINFO, I don't think I need it.

// Small Folder Icon
SHFILEINFOW	siFI_Small				= {0};	
HIMAGELIST	hSImageList				= {0};
	
hSImageList = (HIMAGELIST)SHGetFileInfo( L"Doesn't matter", FILE_ATTRIBUTE_DIRECTORY, &siFI_Small, sizeof( siFI_Small ), SHGFI_SYSICONINDEX | SHGFI_SMALLICON | SHGFI_USEFILEATTRIBUTES );
DeleteObject( siFI_Small.hIcon );

// Large Folder Icon
SHFILEINFOW	siFI_Large				= {0};
HIMAGELIST	hLImageList				= {0};
		
hLImageList = (HIMAGELIST)SHGetFileInfo( L"Doesn't matter", FILE_ATTRIBUTE_DIRECTORY, &siFI_Large, sizeof( siFI_Large ), SHGFI_SYSICONINDEX | SHGFI_SMALLICON | SHGFI_USEFILEATTRIBUTES );
DeleteObject( siFI_Large.hIcon );


It looks like any combination works when adding the folder icon, which is index 1 in the imagelist.

C#
// Column 1 - Filename Icon
lv_ProjectOpen_Item_Record.iItem = dwIndex;
lv_ProjectOpen_Item_Record.iSubItem = 0;
lv_ProjectOpen_Item_Record.mask = LVIF_IMAGE;
lv_ProjectOpen_Item_Record.iImage = 1;
lv_ProjectOpen_Item_Record.cchTextMax = 254;
ListView_InsertItem( lv_ProjectOpen_FileSelect, &lv_ProjectOpen_Item_Record );

// Column 1 - Insert FileName Text
lv_ProjectOpen_Item_Record.mask = LVIF_TEXT;
lv_ProjectOpen_Item_Record.pszText = szFileName;
ListView_SetItem( lv_ProjectOpen_FileSelect, &lv_ProjectOpen_Item_Record);

Questionhow to read flash drive type reader? Pin
Le@rner12-Mar-12 23:46
Le@rner12-Mar-12 23:46 
AnswerRe: how to read flash drive type reader? Pin
Richard MacCutchan13-Mar-12 0:47
mveRichard MacCutchan13-Mar-12 0:47 
QuestionRe: how to read flash drive type reader? Pin
David Crow13-Mar-12 3:48
David Crow13-Mar-12 3:48 
Questiondocumentation c++ gui Pin
yahya7712-Mar-12 7:46
yahya7712-Mar-12 7:46 
AnswerRe: documentation c++ gui Pin
Maximilien12-Mar-12 7:59
Maximilien12-Mar-12 7:59 
GeneralRe: documentation c++ gui Pin
yahya7712-Mar-12 8:25
yahya7712-Mar-12 8:25 
AnswerRe: documentation c++ gui Pin
Richard MacCutchan12-Mar-12 8:00
mveRichard MacCutchan12-Mar-12 8:00 
AnswerRe: documentation c++ gui Pin
CPallini12-Mar-12 22:58
mveCPallini12-Mar-12 22:58 
Questiontoolbar not being loaded for dialog dll---extension dll Pin
appollosputnik12-Mar-12 4:09
appollosputnik12-Mar-12 4:09 
QuestionRe: toolbar not being loaded for dialog dll---extension dll Pin
Richard MacCutchan12-Mar-12 8:03
mveRichard MacCutchan12-Mar-12 8:03 
AnswerRe: toolbar not being loaded for dialog dll---extension dll Pin
appollosputnik12-Mar-12 21:24
appollosputnik12-Mar-12 21:24 
GeneralRe: toolbar not being loaded for dialog dll---extension dll Pin
Richard MacCutchan12-Mar-12 23:25
mveRichard MacCutchan12-Mar-12 23:25 
QuestionUtf-8 in C++/C Pin
jojoba201111-Mar-12 23:37
jojoba201111-Mar-12 23:37 
SuggestionRe: Utf-8 in C++/C Pin
Richard MacCutchan12-Mar-12 0:19
mveRichard MacCutchan12-Mar-12 0:19 
QuestionUtf-8 in C++/C Pin
jojoba201112-Mar-12 0:26
jojoba201112-Mar-12 0:26 
QuestionRe: Utf-8 in C++/C Pin
CPallini12-Mar-12 0:42
mveCPallini12-Mar-12 0:42 
QuestionRe: Utf-8 in C++/C Pin
jojoba201112-Mar-12 0:46
jojoba201112-Mar-12 0:46 

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.