Windows API之图形界面(二)
tkorays (tkorays@hotmail.com)
在程序中会经常使用资源。利用rc.exe可以将*.rc文件编译为*.res文件,之后在链接时可以使用的资源。主要要编写资源脚本文件*.rc和资源头文件。
资源脚本文件里定义资源,而头文件主要定义一些ID,这些ID都有一个唯一的标识。
资源定义声明可以分为三类
1)资源
ACCELERATORS Defines menu accelerator keys.
BITMAP Defines a bitmap by naming it and specifying the name of the file that contains it. (To use a particular bitmap, the application requests it by name.)
CURSOR Defines a cursor or animated cursor by naming it and specifying the name of the file that contains it. (To use a particular cursor, the application requests it by name.)
DIALOG Defines a template that an application can use to create dialog boxes.
DIALOGEX Defines a template that an application can use to create dialog boxes.
FONT Specifies the name of a file that contains a font.
HTML Specifies an HTML file.
ICON Defines an icon