|
|
1.1 root 1: Sample: Constructing and Using a Message Table Resource
2:
3: Summary:
4:
5: This sample demonstrates how to contruct and use a message table
6: resource in your application. The sample message table (messages.mc)
7: for the message compiler (MC.EXE) shows the format of a typical
8: message table source file. Note that some of the entries for each
9: message are optional but are shown for demonstration purposes. See
10: the documentation in the tools.hlp file on the message table
11: compiler for more info on which fields are optional.
12:
13: More Information:
14:
15: This particular sample shows how to create a resource-only DLL that
16: contains nothing but the message table resource. The DLL source file
17: (messages.c) has a stub entry point that simply returns TRUE. This
18: is due to the requirement that a DLL has at least one entry point,
19: so we need to have one for our resource-only DLL.
20:
21: The msgtest.exe executable shows how to load the message table DLL,
22: how to extract the message text from the resource with the
23: FormatMessage API, and how to decode the various bits in the message
24: ID. Note that the messages.h include file to the executable is
25: created during the make process by the message compiler (mc.exe) as
26: it is creating the binary resource file from the message table
27: source file.
28:
29: The makefile should come in very handy in showing how to set up your
30: dependancy rules for your message table source files and message
31: table DLL.
32:
33: This sample could be easily modified to link the message table
34: resource directly into your executable rather than into a
35: stand-alone DLL; there is no requirement that the message table
36: resouce be located only in a DLL, though this is the common case.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.