ResourceTest_MainForm in Marco Cantu, Delphi 2009 Handbook

'ResourceTest_MainForm.pas' {FormResourceTest}; {$R *.res} begi n


You can see the resource compilation steps in the Output view produced by the compiler since Delphi 2007 introduced MSBuild support. Here is the related output you'll see if you keep the Verbose flag of the resource compiler options on:

c:\program fi1es\codegear\rad studio\6.0\bin\cgrc.exe -c65001 -v ResourceTestResource.rc -foResourceTest.dres

CodeGear Resource Compiler/Binder Version 1.00 Copyright (c) 2008 Embarcadero Technologies Inc.

Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0

Copyright (C) Microsoft Corporation. All rights reserved.

Creating ResourceTest.dres Using codepage 65001 as default


Writing ICON:1, 1ang:0x409, size 744

Writing GROUP_ICON:ICON_FACTORY, 1ang:0x409, size 20.

Writing BITMAP:BITMAP_SHIPPING, 1ang:0x409, size 44264

In case you've never used Windows resources directly, the ResourceTest program has a few lines of code to load the icon as the application and main form icon and to load the bitmap in an Image component:

procedure TFormResourceTest.btnGifClick(

Sender: TObject); begi n

Image1.Picture.Bitmap.LoadFromResourceName( hInstance, 'Bitmap_Shipping');

Was this article helpful?

0 0
Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook

Post a comment