ID Number: Q77128
3.00
WINDOWS
Summary:
SYMPTOMS
When the Resource Compiler processes a resource file (an RC file),
processing halts with the message "Error RW2003: Resource Too
Large."
CAUSE
This message indicates that the RC file contains one or more
resources that are too large to fit into the temporary resource
buffer.
RESOLUTION
Break resources larger than 8K into pieces with at most 8K of data
in each piece.
More Information:
When the Resource Compiler generates the resource file, it creates a
temporary resource buffer to hold the information from the RC file.
The size of this buffer is 8K (8192 bytes). For each resource, this
buffer is used to store information and then generate the compiled
resource from it.
For example, if the resource is a bitmap, the header is stored in the
buffer first; then, the bitmap resource is generated. After the bitmap
resource has been generated, the buffer is emptied and is ready to be
used to generate another resource.
The error RW2003 happens most often when a large amount of raw data
(larger than 8K) is specified in an RCDATA statement in the RC file;
raw data defined using RCDATA is put into the buffer. The way to avoid
this situation is to use two or more RCDATA statements to create
multiple resources. Each resource is less than 8K.
In general, this limit does not cause problems because an application
is not likely to have 8K of data in a single menu or control. For
bitmaps, only the header is stored in the buffer.
RC also generates the RW2003 error message when the bitmap format is
not in correct Windows 3.0 format, or uses an unknown DIB (device
independent bitmap) header format.
This information is relevant only to version 3.0 of the Windows SDK;
it may change in a future version of Windows.
Additional reference words: 3.00