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

C / C++ / MFC

 
GeneralURGENT ! Windows Media Player Detect! Pin
mrcoder11-Oct-00 4:32
mrcoder11-Oct-00 4:32 
GeneralRe: URGENT ! Windows Media Player Detect! Pin
Christian20-Oct-00 15:26
Christian20-Oct-00 15:26 
GeneralMenus and Mouseovers Pin
Jason11-Oct-00 4:30
Jason11-Oct-00 4:30 
GeneralRe: Menus and Mouseovers Pin
Michael Dunn11-Oct-00 9:43
sitebuilderMichael Dunn11-Oct-00 9:43 
GeneralParallel Ports & Com Ports Pin
ste10-Oct-00 10:49
ste10-Oct-00 10:49 
GeneralRe: Parallel Ports & Com Ports Pin
Dark Angel11-Oct-00 10:40
Dark Angel11-Oct-00 10:40 
GeneralRe: Parallel Ports & Com Ports Pin
www.frydaysoft.de12-Oct-00 5:34
susswww.frydaysoft.de12-Oct-00 5:34 
QuestionHow to? (some namespace related questions...) Pin
AkelA10-Oct-00 5:00
AkelA10-Oct-00 5:00 
Well I wanted to send 2 pictures, but I don't know how can I attach them. It won't be so easy to describe myself, but I'll try...

I implemented a NameSpace handling code in VC++6.0, without MFC. It works, but it has some problems.

1. I can show the folder's icons. These are OK, and looks like as "original" windows icons. But I use an ExtractIcon application. This app. changes many of system icons. (desktop,my computer, normal directories, shared directories, etc.) How can I ask/get/handle these icons (too)?
2. I can enumerate subfolders. But when I show them the order of subfolders are not the same as in Explorer. How can I sort them?
3. usually I got back no icons. Why? (this func. can not extract all kind of pidl-s?)
4. here's a part of my code: (instead of two pics)
How can I solve the #1, #2 and #3 questions?

// lpsf: interface pointer
// lpi: absolute pid (merged myself)
// hIconSmall: the icon what I want to get
bool ANameSpace::GetDisplayIconOf(IShellFolder *lpsf, LPITEMIDLIST lpi, HICON* hIconSmall)
{
bool _back = true;
HRESULT hres;
IExtractIcon *pxi;

// get IID_IExtractIcon interface
hres = lpsf->GetUIObjectOf(NULL, 1, (LPCITEMIDLIST*)&lpi, IID_IExtractIcon, NULL, (LPVOID *)&pxi);
if (SUCCEEDED(hres))
{
char szIconFile[MAX_PATH];
int iIndex;
UINT wFlags = 0;

hres = pxi->GetIconLocation(GIL_FORSHELL, szIconFile, sizeof(szIconFile), &iIndex, &wFlags);
if (SUCCEEDED(hres))
{
// I need only the small icon
HICON hiconLarge = NULL;
int cxIcon = GetSystemMetrics(SM_CXICON);
int cxSmIcon = GetSystemMetrics(SM_CXSMICON);
// try getting it from the Extract member fuction
hres = pxi->Extract(szIconFile, iIndex, &hiconLarge, hIconSmall,
MAKELONG(cxIcon, cxSmIcon));
}else
_back = false;

pxi->Release();
pMalloc->Free(pxi);
} else
_back = false;

return _back;
}

Thanks in advance,
---
AkelA

QuestionHow can I EDIT/DELETE Excel-records Pin
Sven Fr10-Oct-00 4:38
sussSven Fr10-Oct-00 4:38 
AnswerRe: How can I EDIT/DELETE Excel-records Pin
Tim Deveaux10-Oct-00 5:05
Tim Deveaux10-Oct-00 5:05 
AnswerRe: How can I EDIT/DELETE Excel-records Pin
Erik Funkenbusch10-Oct-00 11:20
Erik Funkenbusch10-Oct-00 11:20 
QuestionThread & Message pb? Pin
Ori10-Oct-00 2:15
Ori10-Oct-00 2:15 
AnswerRe: Thread & Message pb? Pin
Ori10-Oct-00 2:45
Ori10-Oct-00 2:45 
AnswerRe: Thread & Message pb? Pin
Erik Funkenbusch10-Oct-00 11:22
Erik Funkenbusch10-Oct-00 11:22 
GeneralRe: Thread & Message pb? Pin
Ori11-Oct-00 1:50
Ori11-Oct-00 1:50 
GeneralRe: Thread & Message pb? Pin
Erik Funkenbusch11-Oct-00 10:15
Erik Funkenbusch11-Oct-00 10:15 
AnswerRe: Thread & Message pb? Pin
Mark Jones18-Oct-00 11:25
Mark Jones18-Oct-00 11:25 
QuestionCan anyone help me draw to a picture control? Pin
Rick Gungadoo10-Oct-00 1:15
sussRick Gungadoo10-Oct-00 1:15 
Questionhow to change the font for a label Pin
Mac9-Oct-00 22:10
Mac9-Oct-00 22:10 
AnswerRe: how to change the font for a label Pin
frydaysoft.de10-Oct-00 7:25
sussfrydaysoft.de10-Oct-00 7:25 
QuestionStrings from a text file or database? Pin
Fredrik9-Oct-00 21:40
Fredrik9-Oct-00 21:40 
GeneralTitleBar Text Pin
Frank Deo9-Oct-00 11:14
Frank Deo9-Oct-00 11:14 
GeneralMS Access 2000 and VC6 Pin
Gozer9-Oct-00 9:48
Gozer9-Oct-00 9:48 
GeneralWin32API/GDI/Fonts Pin
Kirill Sherman9-Oct-00 9:29
sussKirill Sherman9-Oct-00 9:29 
GeneralCopy constructor in Exception Class Pin
Robin8-Oct-00 16:41
Robin8-Oct-00 16:41 

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.