Translation to obtain authorization of the original author. Thank you here!
- Translator
3.0 - Resource File resource file
We Will Only Add Some Icons To Our Resource File for Now, And Change It Later.
Now we just add some icons to our resource file, and then change it.
Create a New Empty Text File Called Mosaic.rc in Your Mosaic Folder. Put The Following Text In The File:
Create a blank text file called Mosaic.rc in your Mosaic file. Enter a text on the text:
#include "/masm32/include/resource.h"#define icon1_big 400 # define icon2_small 401ICON1_BIG ICON Discardable" Resources // Big.ico "icon2_small icon discardable" Resources // Small.ico "
If you have a resource editor and you can the resource File with an Editor, But I will show you how to do it by Hand, So Everyone Can Create a Resource File, Even WITHOUT A Resource Editor.
If you have a resource editor and you know how to use it. You can create a resource file with an editor, but I will show you how to complete it with a manual method. So everyone can create a resource file, even if there is no resource editor.
The #include statement includes a file called resourece.h from the masm32 package. This file is included in the masm package so you can use some constants in your resource definitions (like dialog styles etc.). The #defines associate a resource name ( Icon1_big) with an id (400 decimal). After you've defined a name, you can define the resource:
#include statement contains a file named resource.h from the MASM package. This file is thus enabled in the MASM package to use some common cooked in the resource definition (such as the style of dialog, etc.). #DEfine associates the resource name (icon1_big) and ID (decimal 400). After you define the name, you can define resources:
Icon1_big icon discardable "resources // big.ico"
This line adds an icon to the resource file (note the double backslash in the filename, always do this, a single backslash is an escape character). The resource is read from the file big.ico in the resources folder. For the small icon IT Works The Same. This line of code adds an icon to the resource file (note two backslash in the file name, each time you have to do this, single backslash trial stroke character). Resources are read from BIG.ICO in the resource folder. The same is true for small icons.
3.1 - Resource IDS Resource ID
In Order to Use the resources, you will have to know their ids. We will define ids in the include file mosaic.inc. Add the twos for the iCons to your mosaic.inc file:
In order to use resources, you have to know their ID. We will define IDs in the included file mosaic.inc. Add the ID of these two icons to your mosaic.inc file:
Icon1_big equ 400icon2_small equ 401
Now you can use icon_big and icon_small in your programs as an id.
West is in your program as an ID as an ID in your program.