Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

icon stored in an dll

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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

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…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

610 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