Page 46 - DCAP408_WEB_PROGRAMMING
P. 46
Windows Programming
Notes Self Assessment
Fill in the blanks:
12. The Windows procedure may also be called the ......................... since it responds to Windows
events.
13. The Windows Procedure is a ......................... pointer, which permits you to call it whatever
you want since the function’s address will be allocated as a function pointer upon creation
of the window class.
14. ......................... is a calling convention used with functions that are called by Windows.
3.7 Adding Custom Resource Data
You can generate a new custom or data resource by positioning the resource in a separate file
using normal resource script (.rc) file syntax, and then involving that file by right-clicking your
project in Solution Explorer and clicking Resource Includes on the shortcut menu.
To add a new custom or data resource:
1. Create a .rc file that comprises the custom or data resource. You can type custom data in a
.rc file as null-terminated quoted strings, or as integers in decimal, hexadecimal, or octal
format.
2. In Solution Explorer, right-click your project’s .rc file, then click Resource Includes on the
shortcut menu.
3. Then perform the process of compilation
4. Click OK to record your modifications.
3.7.1 Compiling the Resource Data
In the Compile-Time Directives box, type a #include statement that provides the name of the
file including your custom resource.
Example: #include mydata.rc
Confirm that the syntax and spelling of what you type are accurate. The contents of the Compile-
Time Directives box are inserted into the resource script file precisely as you typed them.
Another method to produce a custom resource is to import an external file as the custom resource.
Self Assessment
Fill in the blank:
15. In the Compile-Time Directives box, type a ......................... statement that provides the
name of the file including your custom resource.
3.8 Summary
The Windows.h is a Windows-specific header file for the C programming language which
comprises declarations for all of the functions in the Windows API, all the general macros
40 LOVELY PROFESSIONAL UNIVERSITY