|
From: Hind F. <the...@ho...> - 2005-10-12 15:54:29
|
In the ressource file :
100 ICON DISCARDABLE "test.ico"
And be sure that the icon file is in the same directory than the source file
or change the path, for example "res//test.ico" if the icon is in the res
directory.
In the header file or the source file:
#define ID_ICON 100
And in the source file :
wincl.hIcon = LoadIcon (hThisInstance, MAKEINTRESOURCE(ID_ICON));
If you need more information about the syntax or the use of the win32
functions, use the win32 help, try for example this link to download it :
dimcom.uqac.ca/~ecoete/ftp/mmedia/MSHelp/WIN32.HLP
Good Luck
>Date: Wed, 12 Oct 2005 17:08:06 +0200
>
>Hi,
>I write simple aplication from templates and I want to insert icon (my.ico)
>into exe file like resource, and after that when I compile and run
>application see that icon in the list when click Alt+Tab and in the left
>side in the app titlebar.
>
>In test_private.rc file is only this line:
>
>A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "test.ico"
>
>Can somebody explain me syntax of this line or tell me URL on the net where
>can I find explanation of .rc file format, please?
>
>When I compile app only see test.exe with icon (test.ico) in the Windows
>Explorer and when I start exe default Windows icon IDI_APPLICATION is in
>Alt+Tab list.
>
>I know that I must change this lines in the main.c file:
> wincl.hIcon = LoadIcon(NULL, IDI_APPLICATION);
> wincl.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
>but I don't know how to use LoadIcon function. MSDN for LoadIcon have
>little info and don't help me.
>
>Can somebody write simple example for line in .rc file (how to insert
>"my.ico" to exe) and example line in main.c file (wincl.hIcon =
>LoadIcon(???, ???);) please?
>
>Thanks,
>
>Blagoja
_________________________________________________________________
MSN Messenger : discutez en direct avec vos amis !
http://www.msn.fr/msger/default.asp
|