Embed resource in a c/c++ static library

Completed Posted 7 years ago Paid on delivery
Completed Paid on delivery

We need a way to embed resources (such as icons, dialogs) in a c++ (Win32 API) static library.

1. The first need is simple: to embed an icon in the static library in a way that functions that use LoadIcon will work as if it was a normal .exe

2. The main application should only link to the static library and include a header file, with no requirement to add other files such as .rc files, or .ico files, etc.

3. The function with in the static library which uses this icon calls:

m_hIcon = ::LoadIcon(hInstanceIcon, MAKEINTRESOURCE(pXMB->nIdIcon));

where pXMB->nIdIcon is the icon ID (i.e. 101)

Clearly the main application who uses the static library doesn't have this resource so LoadIcon will fail, however we are looking for a workaround to make it work. A static array with the icon data can work as long as the standard API calls (such as LoadIcon) will work, that is because some class libraries we use are 3rd party ones and we don't want to have to change them.

C++ Programming Windows Desktop

Project ID: #13565765

About the project

2 proposals Remote project Active 7 years ago

Awarded to:

amulpatel1993

I will easily create this library because i already created this type of library. I required icon,etc.

$27 USD in 4 days
(0 Reviews)
0.0