Originally posted by: Suneel Kumar.P
How to get the target folder PIDL? ( folder on which the user dorps the files being dragged ).
Some body please help me as soon as possible.
Originally posted by: Matthew Campbell
Does anyone know how to add icons to "My computer". For say a program.
ReplyOriginally posted by: jabarooth
This sample is failing at SHGetSpecialFolderLocation() function calling when i use CSIDL_HISTORY. Help me Pls...
ReplyOriginally posted by: Ashutosh
I want an icon to be displayed in the tree view of the windows explorer. On clicking this icon , i want to launch an exe file. Can any one help me do it ?
thanks in anticipation.
Originally posted by: Pramendra
Does anybody know how to open the Add Printers Dialog Programmatically.
My idea is :
1. Get the PIDL of the 'Add Printer' folder.
2. Fill Up a SHELLEXECUTEINFO Structure.
3. Use ShellExecuteEx to open the dialog.
has anybody done this before?
best regards
Pramendra Dadhwal
Originally posted by: Carsten Witte
Hi Gurus,
I'v done a similar shell-enum, getting all machines, every shared folder (I don't care for printers), entire network... so far so good, but I (or the function) fail miserably when it comes to the comments. Explorer is displaying those fine, so I guess it must be part of it.
At the point, where I got a correct folder and item (must be correct since I get the correct name and icon, what is predicable, since lpItem came from lpFolder->EnumObjects) and tried a:
NETRESOURCE nrc;
::ZeroMemory (&nrc, sizeof (nrc));
hResult= SHGetDataFromIDList (lpFolder, lpItem, SHGDFIL_NETRESOURCE, (PVOID) &nrc, sizeof (nrc));
It simply fails on all machines that are part of my workgroup and therefore childen of the CSIDL_NETWORK and works fine on anything under "Entire Network". But not even then it wouldn't fill *any* of the nrc.lp* entries.
What's wrong?
TIA, Carsten Witte
Reply
Originally posted by: Anand
How can I map an internet drive using FTP, just like a native network drive. The mapped drive should be listed in the windows explorer just like any other logical drive and should provide all the functions e.g copying,renamin, etc.
regards
Anand
Originally posted by: Mihai
Did you try the IShellFolder::CreateViewObject, IShellView::CreateWindow...?
Sincerely, Mihai
Originally posted by: Naveen Kohli
//
HRESULT
CShellExt::GetIconsForControlPanel (LPCTSTR lpszFile, HICON &hIconSm, HICON &hIconLg)
{
HRESULT hr = S_OK;
NEWCPLINFO ncpInfo;
ZeroMemory (&ncpInfo, sizeof (ncpInfo));
ncpInfo.dwSize = sizeof (ncpInfo);
// Load the CPL for the control pannel applet.
HINSTANCE hlibCPL = ::LoadLibrary (lpszFile);
// Get the process address of the Applet's entry point DLL i.e. CPiApplet which all the
// control panel applets are supposed to provide.
APPLET_PROC fCPLApplet = (APPLET_PROC)GetProcAddress (hlibCPL, "CPlApplet");
// Initialize the Applet.
if (fCPLApplet (NULL, CPL_INIT, 0, 0)) {
// Get the number of aplets supported by this control pannel object.
LONG numApplets = fCPLApplet (NULL, CPL_GETCOUNT, 0, 0);
// Inquire the applet.
LONG retVal = fCPLApplet (NULL, CPL_NEWINQUIRE, 0, (LONG)&ncpInfo);
HICON hSmIcon, hLgIcon;
ExtractIconEx (lpszFile, 0, &hSmIcon, &hLgIcon, 2);
hIconSm = ::CopyIcon (hSmIcon);
hIconLg = ::CopyIcon (hLgIcon);
if (hIconSm == NULL) {
hIconSm = ::CopyIcon (hLgIcon);
}
}
// Before we free the applet dll, notify it to exit.
fCPLApplet (NULL, CPL_EXIT, 0, 0);
// Free the loaded library
FreeLibrary (hlibCPL);
return hr;
}
// changes to be made in GetIconsForFolderNode function...
if (m_bControlPanelSearch) {
try {
hr = GetIconsForControlPanel (pszFile, hIconSm, hIconLg);
}
catch (...) {
TRACE (_T ("Exception thrown\n"));
}
}
else {
hr = pExtractIcon->Extract (str, index, &hIconLg, &hIconSm, nIconSize);
pExtractIcon->Release ();
}
Originally posted by: Byron Montgomerie
I know how to get the control panel labels using enum, but
getting the icons for control panels with multiple entries
seems to be a rather tricky task, any ideas? (Some control panels use several icons, descriptions etc
when communicating with the control panel application, you can call them "manually" using various
argument like 1, 2, @1, @2 etc using shell32.dll, but that is icky) Differentiating between
mouse/keyboard/etc when they all resolve to one control panel is my problem, any clue? Is there a standard
argument convention for this kind of thing? Looking for
something that kind apply to control panels, Dialup networking entries etc.
Thanks for any info
Byron