Solved

icon stored in an dll

Posted on 1998-03-26
2
224 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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…
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…

707 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

17 Experts available now in Live!

Get 1:1 Help Now