?
Solved

icon stored in an dll

Posted on 1998-03-26
2
Medium Priority
?
231 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

777 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