Difference between revisions of "MSEide MSEgui Howto"
From Lazarus wiki
Jump to navigationJump to search (→Win32 Application Icon and Properties: fixed some quotes) |
|||
Line 3: | Line 3: | ||
1) Prepare the resource source files in the directory of your program: | 1) Prepare the resource source files in the directory of your program: | ||
− | File | + | File "version_data.rc": |
− | < | + | <pre> |
1 VERSIONINFO | 1 VERSIONINFO | ||
FILEVERSION 4,0,3,17 | FILEVERSION 4,0,3,17 | ||
Line 28: | Line 28: | ||
} | } | ||
} | } | ||
− | </ | + | </pre> |
File ”icon_data.rc”: | File ”icon_data.rc”: | ||
− | < | + | <pre> |
AppIcon ICON ”app_icon.ico” | AppIcon ICON ”app_icon.ico” | ||
− | </ | + | </pre> |
where ”app_icon.ico” is 128x128 24bit ICO image. You may use any size at your favour ( usually depends on preferrable destop resilution/size ) commonly greater or equal to 24x24 pixels. | where ”app_icon.ico” is 128x128 24bit ICO image. You may use any size at your favour ( usually depends on preferrable destop resilution/size ) commonly greater or equal to 24x24 pixels. | ||
Line 52: | Line 52: | ||
3) use the compiled resources in your application : | 3) use the compiled resources in your application : | ||
− | < | + | <pre> |
program super_puper; | program super_puper; | ||
Line 74: | Line 74: | ||
begin | begin | ||
− | setlangconsts( | + | setlangconsts('ru'); |
application.createdatamodule(tdmmainmo,dmmainmo); | application.createdatamodule(tdmmainmo,dmmainmo); | ||
application.createdatamodule(tdmprintmo, dmprintmo); | application.createdatamodule(tdmprintmo, dmprintmo); | ||
Line 83: | Line 83: | ||
application.run; | application.run; | ||
end. | end. | ||
− | </ | + | </pre> |
− | That | + | That's all at the moment. |
Revision as of 19:49, 8 January 2008
Win32 Application Icon and Properties
1) Prepare the resource source files in the directory of your program:
File "version_data.rc":
1 VERSIONINFO FILEVERSION 4,0,3,17 PRODUCTVERSION 3,0,0,0 FILEFLAGSMASK 0 FILEOS 0x40000 FILETYPE 1 { BLOCK ”StringFileInfo” { BLOCK ”040904E4” { VALUE ”CompanyName”,”JSC TashkentP” VALUE ”FileDescription”,”The main program file” VALUE ”FileVersion”,”0.9a” VALUE ”InternalName”,”ARM Podpiska” VALUE ”LegalCopyright”,”JSC TashkentP’s property” VALUE ”OriginalFilename”,”podpiska.pas” VALUE ”ProductName”,”The program for ARM Podpiska” VALUE ”ProductVersion”,”0.9a” } } }
File ”icon_data.rc”:
AppIcon ICON ”app_icon.ico”
where ”app_icon.ico” is 128x128 24bit ICO image. You may use any size at your favour ( usually depends on preferrable destop resilution/size ) commonly greater or equal to 24x24 pixels.
My favorite editor to prepare such ( and any kind of image ) files is ”Embellish”.
2) From within Win-32 command shell, complile the prepared files with the supplied
FPC resource compiler :
- windres -O res -i version_data.rc -o version_data.res
- windres -O res -i icon_data.rc -o icon_data.res
3) use the compiled resources in your application :
program super_puper; {$ifdef FPC}{$mode objfpc}{$h+}{$INTERFACES CORBA}{$endif} {$ifdef FPC} {$ifdef mswindows} {$apptype console} {$endif} {$endif} uses {$ifdef FPC}{$ifdef linux}cthreads,{$endif}{$endif}msegui,mseforms, main,dmmain,dmprint, dmacnt1, dmf18,dmrefs, connsetupform,mseconsts,mseconsts_ru,mseconsts_uzcyr; // importing the compiled resources {$ifdef mswindows} {$R version_data.res} {$R icon_data.res} {$endif} begin setlangconsts('ru'); application.createdatamodule(tdmmainmo,dmmainmo); application.createdatamodule(tdmprintmo, dmprintmo); application.createdatamodule(tdmacnt1mo, dmacnt1mo); application.createdatamodule(tdmf18mo, dmf18mo); application.createdatamodule(tdmrefsmo, dmrefsmo); application.createform(tmainfo,mainfo); application.run; end.
That's all at the moment.