Page 1 of 1

how to include ressources into the executable ?

Posted: Tue Sep 13, 2005 7:46 pm
by phrounz
Hello
I want to include images, etc ... into an executable on Dev-C++.
I am trying to use a .rc file like :

Code: Select all

#include <windows.h>

101		BITMAP 	"code(r)_logo.bmp"
Is it possible and how can I include it in the program ? I tried

Code: Select all

ITexture* texture = pilote->getTexture(MAKEINTRESOURCE (101));
in the main.cpp file but it doesn't work.
It seem that I must add the information that it should search the image using the application instance, like in the first agrument of the window function

Code: Select all

HANDLE LoadImage(      

    HINSTANCE hinst,
    LPCTSTR lpszName,
    UINT uType,
    int cxDesired,
    int cyDesired,
    UINT fuLoad
);

Posted: Tue Sep 13, 2005 8:14 pm
by cpprules
I think that *.rc stuff works only with Visual C++.

Posted: Wed Sep 14, 2005 5:03 pm
by WToma
Somehow Devcpp can handle resources, but I don't know how.
Toma

Posted: Sun Sep 18, 2005 10:54 am
by phrounz
There must be a way to do it, because there is an item in the menu called "New ressource file", and it creates an empty rc file.

I'll try to find it myself. Nevertheless, thanks for help.