?
Solved

icon stored in an dll

Posted on 1998-03-26
2
Medium Priority
?
234 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 100 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

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…

862 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