FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Embed Icon in EXE
Posts: 233
Joined: Sat Dec 30, 2006 06:10 AM
Embed Icon in EXE
Posted: Sun Mar 04, 2007 11:32 AM

How do I imbed an Icon into my EXE?

Many thanks

Ollie.



Using:

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)

Borland C++ 5.5.1

FWH 9.04 (2009 Apr)
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Embed Icon in EXE
Posted: Sun Mar 04, 2007 11:44 AM

Just add it to your .RC or .RES resource file.

EMG

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Embed Icon in EXE
Posted: Sun Mar 04, 2007 01:02 PM

myicon ICON myicon.ico

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 233
Joined: Sat Dec 30, 2006 06:10 AM
Embed Icon in EXE
Posted: Thu May 31, 2007 08:45 PM

Please give me more detail on this...

I have all my BitMAPS, DIALOGS, ICONS stored in a DLL (CS.DLL)

I have a line in my code:
SET RESOURCES TO "CS.DLL"

And I am able to use the BITMAPS etc. in other parts of the program.

What do I need to show my icon CS.ICO in the taskbar of windows and title bar of my app. I don't know how to use .RC or .RES files.

Using FWxH, xHb 99.60 BCC5.51 iLink32.EXE XMate 1.15

Many thanks

Ollie.



Using:

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)

Borland C++ 5.5.1

FWH 9.04 (2009 Apr)
Posts: 56
Joined: Wed May 23, 2007 02:01 PM
Embed Icon in EXE
Posted: Thu May 31, 2007 08:58 PM
hello,

in title of window application:

if you have a icon file:

DEFINE ICON oICON FILENAME "yourIcon.ico"

DEFINE WINDOW oWINDOW FROM 1,1 TO 20,70 MDI;
           COLORS CLR_BLACK,CLR_WHITE;
           MENU BUILDMENU() ;
           ICON oICON ;
           TITLE "YourTitleAplication"


if you have a icon in resource or dll file:

DEFINE ICON oICON RESOURCE "yourIcon"

DEFINE WINDOW oWINDOW FROM 1,1 TO 20,70 MDI;
           COLORS CLR_BLACK,CLR_WHITE;
           MENU BUILDMENU() ;
           ICON oICON ;
           TITLE "YourTitleAplication"



regards
Yury Marcelino Al
yury030575@yahoo.com.br
vimansca@vimansca.com.br
Leme / SP - Brasil
Posts: 233
Joined: Sat Dec 30, 2006 06:10 AM
Embed Icon in EXE
Posted: Thu May 31, 2007 10:11 PM

PERFECT - Thanks! :D

Many thanks

Ollie.



Using:

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)

Borland C++ 5.5.1

FWH 9.04 (2009 Apr)
Posts: 233
Joined: Sat Dec 30, 2006 06:10 AM
Embed Icon in EXE
Posted: Thu May 31, 2007 10:17 PM

Its interesting that the ICON doesn't appear next to the EXE in Windows Explorer - its the blank unknown application icon. (It appears in my application though.) Why is that?

Many thanks

Ollie.



Using:

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)

Borland C++ 5.5.1

FWH 9.04 (2009 Apr)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Embed Icon in EXE
Posted: Thu May 31, 2007 10:31 PM

Create a RC file and add this line:

1 ICON "your_icon.ico"

Then compile it and place it into the EXE, as samples\buildx.bat does

Then your EXE will be shown in the explorer with its icon

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion