How to Override DEFAULT FiveWin ICON ?

Post Reply
shri_fwh
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

How to Override DEFAULT FiveWin ICON ?

Post by shri_fwh »

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



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

Re: How to Override DEFAULT FiveWin ICON ?

Post by cnavarro »

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


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

Re: How to Override DEFAULT FiveWin ICON ?

Post by shri_fwh »

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

Re: How to Override DEFAULT FiveWin ICON ?

Post by cnavarro »

Try with correct path and quotes

Code: Select all | Expand


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

Re: How to Override DEFAULT FiveWin ICON ?

Post by shri_fwh »

Dear Sir ,

tried below code but no success...!

Code: Select all | Expand



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

 


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

Code: Select all | Expand


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 ?

Post by shri_fwh »

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 ?

Post by shri_fwh »

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 ?

Post by shri_fwh »

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


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



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 ?

Post by shri_fwh »

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 ?

Post by shri_fwh »

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
Post Reply