ROPOPUP.TXT =========== Summary: The Microsoft Windows 3.1 SDK manual "The Windows Interface: An Application Design Guide" describes a read-only popup text field. These are text fields that, when clicked on with the mouse, display a read-only popup window containing additional information. ROPOPUP is a sample which demonstrates how to implement such a read- only popup window to display text. The sample also demonstrates how to add the shadow to this read-only popup. ROPOPUP was archived using the PKware file-compression utility. More Information: In the ROPOPUP sample, a pushbutton is used to invoke the read-only popup window. The read-only popup window is simply a popup window that has no non-client areas (caption, system menu, menu, minimize/ maximize buttons, sizing border, etc.). Text is displayed on the client area and then any mouse or keyboard input causes the popup to be destroyed. Achieving the shadow effect requires several steps: 1. Set the read-only popup window class' brush to a NULL_BRUSH. Note: The NULL_BRUSH is retrieved via GetStockObject(NULL_BRUSH) not by setting the class brush to NULL. The effect is that the popup will be entirely invisible. This step is needed in order to allow the shadow to be partially transparent. 2. Create the shadow brush pattern. The shadow's pattern is defined by a monochrome bitmap with alternating black and white pixels. 3. In the WM_PAINT message case for the popup window, three things need to be done: a. Fill the non-shadow area of the popup using the Rectangle function. b. Output the read-only text on the non-shadow area. c. Paint the shadow using PatBlt with ROP code 0xA000C9 to combine the shadow pattern and the background. For each black pixel in the pattern, this ROP code puts a black pixel on the screen. For each white pixel in the pattern, the existing screen pixel is left untouched. The end result is a shadow that is partially transparent.