Viktor,

----------8<-----------------------
Syntax:

  ICON icon-id  [load-option] [ mem-option] [codepage] filename


This form of the ICON statement defines an icon resource for an application.
An icon resource, typically created by using Icon Editor, is a bit map
defining the shape of the icon to be used for a given application. The ICON
statement copies the icon resource from the file specified in the filename
field and adds it to the application's other resources. An icon resource can
be loaded when creating a window by using the WinCreateStdWindow function with
the FS_ICON style.

You can provide any number of ICON statements in a resource script file, but
each statement must specify a unique icon-id value.

icon-id Specifies the icon-resource identifier. This value must be an unsigned
integer in the range of 1 through 65535, a simple expression that evaluates to
a value in these ranges, or a character string. An icon-id of 1 has a special
meaning; for details, see the "Comment" section.
load-option Specifies when the system loads the resource from the executable
file into memory. This value must be one of the following:
PRELOAD System loads the resource when the application starts.
LOADONCALL System loads the resource when the application calls the
WinCreateStdWindow function. This is the default option.
mem-option Specifies how the system manages the resource when it is in memory.
This value must be one or more of the following:
FIXED System keeps the resource at a fixed memory location.
MOVEABLE System moves the resource as necessary to compact memory.
DISCARDABLE System discards the resource if it is no longer needed. The
default setting is MOVEABLE and DISCARDABLE.
codepage Specifies a code page value. For a list of valid code pages see
CODEPAGE Statement.
filename Specifies the name of the file containing the icon resource. If the
file is not in the current directory, filename must be preceded by a full path.

Comments

An icon with an icon-id of 1 is the default icon. The RC program writes the
icon not only to the resources in your executable file, but also as the .ICON
extended attribute. File Manager will display this icon next to the name of
the executable file.

Example

This example defines an icon whose icon identifier is 11. The icon resource is
copied from the file custom.ico.

ICON 11 custom.ico
-------->8-----------------

Now I'll try to remove double slashes.

Maurilio.


Viktor Szakáts wrote:
> Hi,
> 
> Pls help finding out what is the proper .rc format 
> to include an icon in OS/2.
> 
> I copied current logic from hbmk2, but it's possible 
> nobody tried it even there, so it was wrong.
> 
> (Worth to try with single backslashes first.)
> 
> Brgds,
> Viktor
> 
> On 2010 Mar 29, at 10:15, Maurilio Longo wrote:
> 
>> Hi,
>>
>> I get this on OS/2 + GCC
>>
>>
>> ../../../../../bin/os2/gcc/harbour.exe ../../../dbgbrwsr.prg
>> -i../../../../../include -n1 -q0 -w3 -es2 -kmo -i- -l
>> gcc   -I. -I../../../../../include -Wall -W -O3 -DHB_LEGACY_TYPES_OFF
>> -odbgbrwsr.o -c dbgbrwsr.c
>> ar    -M < __lib__.tmp & strip -S ../../../../../lib/os2/gcc/hbdebug.a &
>> ..\..\..\..\..\config\os2rm -f __lib__.tmp
>> gcc  -shared -L../../../../../lib/os2/gcc  -o
>> ../../../../../bin/os2/gcc/harbour.dll -Wl,@__dyn__.tmp __dyn__.def -lsocket 
>> -s
>> emximp -o ../../../../../lib/os2/gcc/harbour.a
>> ../../../../../bin/os2/gcc/harbour.dll
>> gcc  -shared -L../../../../../../lib/os2/gcc  -o
>> ../../../../../../bin/os2/gcc/harbourm.dll -Wl,@__dyn__.tmp __dyn__.def
>> -lsocket -s
>> emximp -o ../../../../../../lib/os2/gcc/harbourm.a
>> ../../../../../../bin/os2/gcc/harbourm.dll
>> ../../../../../bin/os2/gcc/harbour.exe ../../../hbrun.prg
>> -i../../../../../include -n1 -q0 -w3 -es2 -kmo -i- -l
>> gcc   -I. -I../../../../../include -Wall -W -O3 -DHB_LEGACY_TYPES_OFF
>> -ohbrun.o -c hbrun.c
>> windres -O coff   -o hbrun.res ../../../hbrun.rc
>> windres: ../../../hbrun.rc:6: parse error
>> make[3]: *** [hbrun.res] Error 1
>> make[2]: *** [descend] Error 2
>> make[1]: *** [hbrun] Error 2
>> make: *** [utils] Error 2
>>
>>
>> Maurilio.
>>
>> -- 
>> __________
>> |  |  | |__| Maurilio Longo
>> |_|_|_|____| farmaconsult s.r.l.
>>
>> 
>> _______________________________________________
>> Harbour mailing list (attachment size limit: 40KB)
>> [email protected]
>> http://lists.harbour-project.org/mailman/listinfo/harbour
> 
> _______________________________________________
> Harbour mailing list (attachment size limit: 40KB)
> [email protected]
> http://lists.harbour-project.org/mailman/listinfo/harbour
> 

-- 
 __________
|  |  | |__| Maurilio Longo
|_|_|_|____| farmaconsult s.r.l.


_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to