How to Override DEFAULT FiveWin ICON ?

How to Override DEFAULT FiveWin ICON ?

Postby shri_fwh » Sun Jul 28, 2019 3: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: Select all  Expand view


   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 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

Re: How to Override DEFAULT FiveWin ICON ?

Postby cnavarro » Sun Jul 28, 2019 4: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: Select all  Expand view

      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
User avatar
cnavarro
 
Posts: 6548
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: How to Override DEFAULT FiveWin ICON ?

Postby shri_fwh » Mon Jul 29, 2019 4: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 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

Re: How to Override DEFAULT FiveWin ICON ?

Postby cnavarro » Mon Jul 29, 2019 10:36 pm

Try with correct path and quotes

Code: Select all  Expand view

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
User avatar
cnavarro
 
Posts: 6548
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: How to Override DEFAULT FiveWin ICON ?

Postby shri_fwh » Tue Jul 30, 2019 3:57 am

Dear Sir ,

tried below code but no success...!

Code: Select all  Expand view


AppIcon   ICON DISCARDABLE   "C:\VIMDEV32\VIMFA32\RES\app.ico"

 


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

Code: Select all  Expand view

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 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm


Re: How to Override DEFAULT FiveWin ICON ?

Postby shri_fwh » Tue Jul 30, 2019 8:50 am

Hi EMG ,

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


Thanks
Shridhar
Thanks
Shridhar
FWH 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

Re: How to Override DEFAULT FiveWin ICON ?

Postby Enrico Maria Giordano » Tue Jul 30, 2019 9:00 am

Which resource compiler are you using?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to Override DEFAULT FiveWin ICON ?

Postby shri_fwh » Tue Jul 30, 2019 9:27 am

Hi EMG ,

I am using brc BCC 7 resource compiler.

Thanks
Shridhar
Thanks
Shridhar
FWH 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

Re: How to Override DEFAULT FiveWin ICON ?

Postby Enrico Maria Giordano » Tue Jul 30, 2019 9:59 am

This works fine for me:

Code: Select all  Expand view
TEST ICON icon.ico


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to Override DEFAULT FiveWin ICON ?

Postby shri_fwh » Tue Jul 30, 2019 5: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: Select all  Expand view

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: Select all  Expand view


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 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

Re: How to Override DEFAULT FiveWin ICON ?

Postby Enrico Maria Giordano » Tue Jul 30, 2019 5:25 pm

Works fine here. Try only

Code: Select all  Expand view
brc32 -r yourfile.rc


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to Override DEFAULT FiveWin ICON ?

Postby shri_fwh » Wed Jul 31, 2019 4: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

[url]

https://stackoverflow.com/questions/123 ... ate-failed
[/url]

Thanks
Shridhar
Thanks
Shridhar
FWH 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

Re: How to Override DEFAULT FiveWin ICON ?

Postby Enrico Maria Giordano » Wed Jul 31, 2019 9:08 am

Please, send me your icon to test it here.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to Override DEFAULT FiveWin ICON ?

Postby shri_fwh » Sat Aug 03, 2019 8:08 am

Hi EMG ,

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

Thanks
Shridhar
Thanks
Shridhar
FWH 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 50 guests