Ropopup.exe Demos Read-Only Pop-Up Window w/ Shadow

ID: Q104792


The information in this article applies to:


SUMMARY

Ropopup.exe is a file in the Microsoft Software Library that demonstrates how to implement such a read-only pop-up window to display text. The sample also demonstrates how to add a shadow to this read-only pop-up window.

The Microsoft Windows SDK "The Windows Interface: An Application Design Guide" version 3.1 manual describes a read-only pop-up text field as a text field that, when clicked with the mouse, displays a read-only pop-up window containing additional information.


MORE INFORMATION

The following file is available for download from the Microsoft Software Library:

~ Ropopup.exe
For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online Services


In the ROPOPUP sample, a button is used to invoke the read-only pop-up window. The read-only pop-up window is merely a pop-up window that has no nonclient areas (caption, system menu, menu, minimize/maximize buttons, sizing border, and so forth). Text is displayed on the main part of the pop-up window's client area. A shadow is displayed on the bottom and right sides of the client area.

Achieving the shadow effect requires several steps:

  1. Set the read-only pop-up window class's brush to a NULL_BRUSH. NOTE: The NULL_BRUSH is retrieved via GetStockObject(NULL_BRUSH). The effect is that the pop-up window will be entirely invisible. This step is needed in order to allow the shadow to be partially transparent.


  2. In the WM_CREATE message case for the pop-up window, 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 pop-up window, three things need to be done:


The read-only pop-up window is terminated by any mouse button or keyboard input. Because all the output for the pop-up window is done in its client area, no special screen cleanup is needed. Windows automatically refreshes what lies beneath the pop-up window.

Additional query words: shadow effect


Keywords          : kbfile kbsample kb16bitonly kbGDI kbSDKWin16 
Version           : WINDOWS:3.1
Platform          : WINDOWS 
Issue type        : kbinfo 

Last Reviewed: June 17, 1999