Using a Hidden Color Map

Another identification process involves using a memory-map color mask to determine where events have occurred in a bitmap that is not composed of contiguous color regions. This method uses a second color map that is not displayed; that is, it is created in a memory context, not a display context.

This second map contains the color-identification values for the primary bitmap that appears on the screen. Then, when the mouse is used to select a point on the displayed bitmap, you look for the pixel value in the hidden bitmap and match this color to the keys.

© 1998 SYBEX Inc. All rights reserved.