MYPAL: Manipulates the System Palette and the Title Bar
MYPAL demonstrates how to display the current system palette, capture mouse input outside the application's main window, change the title bar, process the HOME, END, PAGEUP, and PAGEDOWN keys, and process the WM_GETMINMAXINFO message to control the size of the window.
When you start MYPAL, the application's main window displays all the colors on the system palette and the title bar specifies the number of colors displayed.
When you click the left mouse button on a color in the window, the title bar reflects the index number into the system palette and specifies the red-green-blue (RGB) values for that color. Boxes at either end of the title bar show the color selected.
When you click the right mouse button on a color in the window, the title bar reflects the index numbers of colors on the system palette, the index of the selected color on the system palette, the number of colors on the palette (PalSize), and a RasterCaps setting of 0 or 1, depending on whether a palette is supported.
When you drag the mouse with the right button down, the title bar reflects the index number and RGB values for each color as the pointer moves across the window. Boxes at either end of the title bar show each color selected.
You can use MYPAL to find the RGB values of a color displayed on the screen and plug those values into your color selector.
MYPAL was built and tested under Microsoft(R) Windows(TM) version 3.1.
KEYWORDS: SetCapture; mouse; palette; GetNearestColor; Home, End, PageUp, PageDown; WM_GETMINMAXINFO
{ewc navigate.dll, ewbutton, /Bcodeview /T"Click to open or copy files in the mypal project." /C"samples}