Solved

icon stored in an dll

Posted on 1998-03-26
2
225 Views
Last Modified: 2012-06-27
Is it possible to use a icon in runtime thats stored in a dll.
if so how??
0
Comment
Question by:dgb
2 Comments
 
LVL 39

Accepted Solution

by:
abel earned 50 total points
ID: 1459839
Below is the function you should use in your application. The function is easy to use. Just look up the declaration in the api-viewer and paste it in you app. The explanation of the variables are given below.
If you need an example, just give a comment and I'll post you one.


ExtractIcon
---------------
The ExtractIcon function retrieves the handle of an icon from the specified executable file, dynamic-link library (DLL), or icon file.

HICON ExtractIcon(
   HINSTANCE hInst,                            // instance handle
   LPCTSTR lpszExeFileName,         // filename of file with icon
   UINT nIconIndex                                // index of icon to extract
);



Parameters
----------------
hInst
Identifies the instance of the application calling the function.

lpszExeFileName
Points to a null-terminated string specifying the name of an executable file, DLL, or icon file.

nIconIndex
Specifies the index of the icon to retrieve. If this value is 0, the function returns the handle of the first icon in the specified file. If this value is -1, the function returns the total number of icons in the specified file.

Return Values
-------------------
If the function succeeds, the return value is the handle to an icon. If the file specified was not an executable file, DLL, or icon file, the return is 1. If no icons were found in the file, the return value is NULL.
0
 
LVL 1

Expert Comment

by:dipal_shah
ID: 1459840
Dear able,
       if you can send some code for same to me i will be really thankful to you. If you can tell me about using others resources in .DLL file.

It will really be of a great help.

Thankyou
Dipal (dipal_shah@hotmail.com)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now