Programming Windows (Fifth Edition)





2.8.1. Chapter 8 - Beeper1

Last updated: 2001/2/28

Description

Sets up a timer so that it receives a WM_TIMER message every second. For each message, changes the color of the window between red and blue and emits a beep using MessageBeep. Note, the window starts blue and then alternates between red and blue.

For some reason I get a weird kind of beep on my laptop (more a blurp than a beep actually).

Wine tests

Winelib tests

2.8.2. Chapter 8 - Beeper2

Last updated: 2001/2/28

Description

Same as Beeper1 but using a callback method instead of handling the WM_TIMER message in the message loop. Note that this version starts with a white window, and then, aternates between red and blue.

For some reason I get a weird kind of beep on my laptop (more a blurp than a beep actually).

Wine tests

Winelib tests

2.8.3. Chapter 8 - Clock

Last updated: 2001/2/26

Description

Displays an analogic clock using the isomorphic cartographic mode which means a circle should display as a circle, not an ellipse, no matter what the resolution. But since this stuff is never setup properly...

Wine tests

Winelib tests

2.8.4. Chapter 8 - DigClock

Last updated: 2001/2/28

Description

Implements a clock with an LCD like display. The character resize automatically as you resize the window but they always keep the same proportions.

Wine tests

Winelib tests

2.8.5. Chapter 8 - WhatClr

Last updated: 2001/2/28

Description

Creates a small window and displays the hexadecimal value of the color of the pixel under the hot-point of the cursor, wherever the cursor is on the screen. It does this by creating a special DC using 'CreateDC("DISPLAY,...)' and then using a timer to perform a periodic refresh.

Note that the window is not resizable.

Wine tests

Winelib tests

fgouget@free.fr This page is hosted for free by Free.fr