FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to Override DEFAULT FiveWin ICON ?
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
How to Override DEFAULT FiveWin ICON ?
Posted: Sun Jul 28, 2019 03:43 PM
Dear All ,

After Application Built the app.EXE is executing and on the Windows Status BAR the Default FiveWIN ICON is showing.

Have tried below code to use app ICON for the main window but it does not get override the default FiveWin.ICO

Code (fw): Select all Collapse
   DEFINE ICON oICon RESOURCE "app_icon"

   DEFINE WINDOW oApp:oWnd STYLE WS_POPUP COLOR CLR_BLACK, c_MWIN_BCK_CLR ICON oICon


Am I doing right ? Please guide me.

Thanks
Shridhar
Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: How to Override DEFAULT FiveWin ICON ?
Posted: Sun Jul 28, 2019 04:13 PM
include in your rc file ( resource with name AppIcon )

AppIcon ICON DISCARDABLE ".\MyIcono.ico"

in your application

DEFINE ICON oIcon RESOURCE "AppIcon"

Set icon to windows object
Code (fw): Select all Collapse
      oWnd:SetIcon( oIcon )
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Re: How to Override DEFAULT FiveWin ICON ?
Posted: Mon Jul 29, 2019 04:57 PM
Dear Sir ,

Include below command in the .rc file but it is giving an error of "Allocate Failed"


AppIcon ICON DISCARDABLE .\Healthgui.ico


Thanks
Shridhar
Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: How to Override DEFAULT FiveWin ICON ?
Posted: Mon Jul 29, 2019 10:36 PM
Try with correct path and quotes

Code (fw): Select all Collapse
AppIcon   ICON DISCARDABLE ".\MyIcono.ico"
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Re: How to Override DEFAULT FiveWin ICON ?
Posted: Tue Jul 30, 2019 03:57 AM
Dear Sir ,

tried below code but no success...!

Code (fw): Select all Collapse
AppIcon   ICON DISCARDABLE   "C:\VIMDEV32\VIMFA32\RES\app.ico"


by the way below resources are compiling successfully without using quote.

Code (fw): Select all Collapse
save1    10 .\icon\save1.png
save2    10 save2.png
exit1    10 exit.png
search1  10 search1.png
invoice  10 invoice.png
bottom   BITMAP .\..\bitmaps\32x32\bottom.bmp
help     BITMAP .\..\bitmaps\32x32\help.bmp
help3    BITMAP .\..\bitmaps\32x32\help3.bmp
new      BITMAP .\..\bitmaps\32x32\new.bmp
open     BITMAP .\..\bitmaps\32x32\open.bmp
copy     BITMAP .\..\bitmaps\32x32\copy.bmp
prev     BITMAP .\..\bitmaps\32x32\previous.bmp
next     BITMAP .\..\bitmaps\32x32\next.bmp
filter   BITMAP .\..\bitmaps\32x32\filter.bmp
add      BITMAP .\..\bitmaps\32x32\plus.bmp
edit     BITMAP .\..\bitmaps\32x32\edit.bmp
del      BITMAP .\..\bitmaps\32x32\minus.bmp
search   BITMAP .\..\bitmaps\32x32\search.bmp
impexp   BITMAP .\..\bitmaps\32x32\imp_exp.bmp
index    BITMAP .\..\bitmaps\32x32\index2.bmp
paste    BITMAP .\..\bitmaps\32x32\paste.bmp
process  BITMAP .\..\bitmaps\32x32\process.bmp
run      BITMAP .\..\bitmaps\32x32\run.bmp
struct   BITMAP .\..\bitmaps\32x32\setup.bmp
top      BITMAP .\..\bitmaps\32x32\top.bmp
relation BITMAP .\..\bitmaps\32x32\relation.bmp
report   BITMAP .\..\bitmaps\32x32\print.bmp
code     BITMAP .\..\bitmaps\32x32\source.bmp
view     BITMAP .\..\bitmaps\32x32\view.bmp
deleted  BITMAP .\..\bitmaps\16x16\delete0.bmp
nondeleted BITMAP .\..\bitmaps\16x16\yes.bmp



Thanks
Shridhar
Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to Override DEFAULT FiveWin ICON ?
Posted: Tue Jul 30, 2019 07:35 AM

Try to remove DISCARDABLE.

EMG

Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Re: How to Override DEFAULT FiveWin ICON ?
Posted: Tue Jul 30, 2019 08:50 AM

Hi EMG ,

 Tried also just "ICON" but not working...!

Thanks
Shridhar

Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to Override DEFAULT FiveWin ICON ?
Posted: Tue Jul 30, 2019 09:00 AM

Which resource compiler are you using?

EMG

Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Re: How to Override DEFAULT FiveWin ICON ?
Posted: Tue Jul 30, 2019 09:27 AM

Hi EMG ,

I am using brc BCC 7 resource compiler.

Thanks
Shridhar

Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to Override DEFAULT FiveWin ICON ?
Posted: Tue Jul 30, 2019 09:59 AM
This works fine for me:

Code (fw): Select all Collapse
TEST ICON icon.ico


EMG
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Re: How to Override DEFAULT FiveWin ICON ?
Posted: Tue Jul 30, 2019 05:00 PM
Hi EMG ,

Given below same code which having the error "Allocate failed". Please let me know where it is wrong.

When I remove ICON and put BITMAP it works fine but ICON does get displayed on Windows' Task Bar.

app.rc file

Code (fw): Select all Collapse
ico  ICON ".\.\..\ICONS\fivewin.ico"

#ifndef __64__
  1 24 "WinXP\WindowsXP.Manifest" 
#endif

#ifdef __64__
  1 24 "WinXP\WindowsXP.Manifest64"
#endif 

background BITMAP .\..\bitmaps\backgrnd\iosbg.bmp
AppIcon  ICON app.ico
save1    10 .\icon\save1.png
save2    10 save2.png
exit1    10 exit.png
search1  10 search1.png
invoice  10 invoice.png
bottom   BITMAP .\..\bitmaps\32x32\bottom.bmp
help     BITMAP .\..\bitmaps\32x32\help.bmp
help3    BITMAP .\..\bitmaps\32x32\help3.bmp
new      BITMAP .\..\bitmaps\32x32\new.bmp
open     BITMAP .\..\bitmaps\32x32\open.bmp
copy     BITMAP .\..\bitmaps\32x32\copy.bmp
prev     BITMAP .\..\bitmaps\32x32\previous.bmp
next     BITMAP .\..\bitmaps\32x32\next.bmp
filter   BITMAP .\..\bitmaps\32x32\filter.bmp
add      BITMAP .\..\bitmaps\32x32\plus.bmp
edit     BITMAP .\..\bitmaps\32x32\edit.bmp
del      BITMAP .\..\bitmaps\32x32\minus.bmp
search   BITMAP .\..\bitmaps\32x32\search.bmp
impexp   BITMAP .\..\bitmaps\32x32\imp_exp.bmp
index    BITMAP .\..\bitmaps\32x32\index2.bmp
paste    BITMAP .\..\bitmaps\32x32\paste.bmp
process  BITMAP .\..\bitmaps\32x32\process.bmp
run      BITMAP .\..\bitmaps\32x32\run.bmp
struct   BITMAP .\..\bitmaps\32x32\setup.bmp
top      BITMAP .\..\bitmaps\32x32\top.bmp
relation BITMAP .\..\bitmaps\32x32\relation.bmp
report   BITMAP .\..\bitmaps\32x32\print.bmp
code     BITMAP .\..\bitmaps\32x32\source.bmp
view     BITMAP .\..\bitmaps\32x32\view.bmp
deleted  BITMAP .\..\bitmaps\16x16\delete0.bmp
nondeleted BITMAP .\..\bitmaps\16x16\yes.bmp


command to build .RES file
Code (fw): Select all Collapse
for %%f in (%PRJHOMEDIR%\RES\*.rc) do %BCCDIR%\bin\brc32.exe -r -I%BCCDIR%\include -I%BCCDIR%\include\windows\sdk -I%BCCDIR%\include\windows\crtl -I%BCCDIR%\include\windows\rtl %%~f


Thanks
Shridhar
Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to Override DEFAULT FiveWin ICON ?
Posted: Tue Jul 30, 2019 05:25 PM
Works fine here. Try only

Code (fw): Select all Collapse
brc32 -r yourfile.rc


EMG
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Re: How to Override DEFAULT FiveWin ICON ?
Posted: Wed Jul 31, 2019 04:43 AM
Hi EMG ,

Have tried but no success...!

I am not sure whether the ICON resolution does support or NOT. as below stackoverflow URL

https://stackoverflow.com/questions/123 ... ate-failed
" rel="noopener">

https://stackoverflow.com/questions/123 ... ate-failed


Thanks
Shridhar
Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to Override DEFAULT FiveWin ICON ?
Posted: Wed Jul 31, 2019 09:08 AM

Please, send me your icon to test it here.

EMG

Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Re: How to Override DEFAULT FiveWin ICON ?
Posted: Sat Aug 03, 2019 08:08 AM

Hi EMG ,

Sent ICON file to your email e.m.giordano@emagsoftware.it

Thanks
Shridhar

Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB