473,657 Members | 2,609 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get icon from shell32.dll?

Neo
I am developing a GUI for a destop application in Visual C++ .Net 2005, I am
trying to create toolbar exactlly same as windows explorer which will have
default windows icons, which are in windows folder shell32.dll.

please let me know, how to get and use icons from shell32.dll?

thanks, best regards,

Mohammad Omer Nasir
May 11 '06 #1
4 5314
On Thu, 11 May 2006 18:43:32 +0500, "Neo" <mo******@hotma il.com>
wrote:
I am developing a GUI for a destop application in Visual C++ .Net 2005, I am
trying to create toolbar exactlly same as windows explorer which will have
default windows icons, which are in windows folder shell32.dll.

please let me know, how to get and use icons from shell32.dll?


Google reshacker.
May 11 '06 #2
11 May 2006 18:43:32 +0500, Neo <mo******@hotma il.com> wrote:
please let me know, how to get and use icons from shell32.dll?


HINSTANCE hDllInst = LoadLibrary("sh ell32.dll");
HICON hIcon = LoadIcon(hDllIn st, MAKEINTRESOURCE ( put resource number here ));

The resource number is between 1 and 238 for shell32.dll version 6.0

Use DrawIcon() to draws in the client area of the window.

Use SetClassLong() with GCL_HICON to change an existing window icon.
May 11 '06 #3
Neo
i am trying to set Icon using CToolBar class.
tell me,
how to change toolbar icon using CToolBar class?
how we get explorer toolbar icon and use in our application?

thanks, best regards,

Mohammad Omer Nasir

"JF Jolin" <sp**@nospam.co m> wrote in message
news:op******** ******@news.con tact.net...
11 May 2006 18:43:32 +0500, Neo <mo******@hotma il.com> wrote:
please let me know, how to get and use icons from shell32.dll?

HINSTANCE hDllInst = LoadLibrary("sh ell32.dll");
HICON hIcon = LoadIcon(hDllIn st, MAKEINTRESOURCE ( put resource

number here ));
The resource number is between 1 and 238 for shell32.dll version 6.0

Use DrawIcon() to draws in the client area of the window.

Use SetClassLong() with GCL_HICON to change an existing window icon.

May 12 '06 #4
12 May 2006 18:48:12 +0500, Neo <mo******@hotma il.com> wrote:
i am trying to set Icon using CToolBar class.
tell me,
how to change toolbar icon using CToolBar class?
I am not an MFC user myself.
But as far as I understand them.
I would try or guess around the following:

CImageList::Cre ate CImageList::Add (icon previously found)
CToolBar::GetTo olBarCtrl
CToolBarCtrl::S etImageList
how we get explorer toolbar icon and use in our application?


I already answered that question. Didn't I ?
May 12 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3726
by: Terry | last post by:
There are a number of things about using unmanaged resources in Windows Forms programming that is unclear to me. In C++, if you loaded an icon resource using "ExtractIcon()", the resource was valid until you called "DestroyIcon()". If you didn't, you had a leak. In C#, I need to load icons from unmanaged programs (.exe, dll) at run time and I want to make sure I'm not leaking resources, but it's not clear to me how to insure that I'm...
4
4621
by: kurotsuke | last post by:
Can anybody tell me how I can call the Pick Icon Dialog from C#? I couldn't find any example. Thanks.
6
10505
by: Mohammad-Reza | last post by:
Hi I want to extract icon of an exe file and want to know how. I look at the MSDN and find out that I can use ExtractIconEx() Windows API but in there are some changes to that api in c# I made those changes like this : public static extern uint ExtractIconEx( string szFile,
2
3331
by: Craig | last post by:
I've seen many examples of how to call SHGetFileInfo in shell32.dll to get a files associated icon, but I can't find anywhere how to get the file information (size, last date modified, etc, etc) out of shell32 using pinvoke. I have however seen how to get this information using COM: Shell32.Shell shell = new Shell32.ShellClass(); Shell32.Folder folder = shell.NameSpace("C:\\"); Shell32.FolderItem folderItem =...
0
1271
by: Chris Martinez via .NET 247 | last post by:
I don't know if you ever got this resolved but I would becurious. The reason you can't get the folder icons is becauseyou are using SHGFI_FILE_ATTRIBUTES. Take that out and use thevalue of 0 instead of 256 for the file attribute flags. Which operating system were you developing this with? I triedmany attempts, including your example, to get a system iconusing SHGetFileInfo and writing it to the browser as"image/x-icon" just as you've...
2
2813
by: Dickyb | last post by:
Extracting an Icon and Placing It On The Desktop (C# Language) I constructed a suite of programs in C++ several years ago that handle my financial portfolio, and now I have converted them to C#. The only significant problem that I have encountered in the conversion is this one - extracting an icon from the 'KTEntryPoint' program into the software suite and placing that icon on the PC Desktop.
8
5182
by: Joachim | last post by:
Hello everybody! I am currently developing a sidebar-application and getting stucked in the problem of extracting the default application icon of .exe and .dll files. Has anybody out there a solution in VB . Net? I tried a solution using LoadLibraryEx, LoadResource, FindResource, ExtractIcon etc. but only run into StackOverflow errors. Hence I guess that the HICON-structure of the native window system and the .NET Icon-class differ in...
0
1678
by: yxq | last post by:
Hello, I use the API ExtractIcon to get icon from Shell32, but the returned icon lost alpha channel, how get back the alpha channel? thank you. ********************************************************************************************** Private Declare Function ExtractIconEx Lib "shell32.dll" Alias "ExtractIconExA" (ByVal lpszFile As String, ByVal nIconIndex As Int32, ByRef phiconLarge As Int32, ByRef phiconSmall As Int32, ByVal nIcons...
6
3918
by: Laurent Navarro | last post by:
Hello, I have an EXE (.NET assembly) file with an icon which has 8 formats (128x128, 96x961, ..., 24x24 and 16x16). I would like the extract the 128x128 sized icon only to display it on a PictureBox control. I made some searchs and discovered that the Icon.ExtractAssociatedIcon() function can do what I want, but only for the smallest icon size, ie 16x16 here... I tried Assembly.GetManifestResourceStream() also but I didn't
0
8397
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2731
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1620
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.