473,394 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 5289
On Thu, 11 May 2006 18:43:32 +0500, "Neo" <mo******@hotmail.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******@hotmail.com> wrote:
please let me know, how to get and use icons from shell32.dll?


HINSTANCE hDllInst = LoadLibrary("shell32.dll");
HICON hIcon = LoadIcon(hDllInst, 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.com> wrote in message
news:op**************@news.contact.net...
11 May 2006 18:43:32 +0500, Neo <mo******@hotmail.com> wrote:
please let me know, how to get and use icons from shell32.dll?

HINSTANCE hDllInst = LoadLibrary("shell32.dll");
HICON hIcon = LoadIcon(hDllInst, 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******@hotmail.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::Create CImageList::Add (icon previously found)
CToolBar::GetToolBarCtrl
CToolBarCtrl::SetImageList
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
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...
4
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
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...
2
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)...
0
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...
2
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...
8
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...
0
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. ...
6
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...

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.