About the Sample

[Previous] [Next]

The sample we'll use here is an ActiveX control that monitors message traffic through a hook procedure, displaying a real-time graph of the message flow over time. The control renders its graph to the screen and has incoming interfaces, so the container can tell the control to start and stop the graph. The control supports both the graph line color and message interval length as properties that can be persisted. Finally, the control supports a default event set for notifying the container how many messages are processed within a certain interval.

The control manages a window hook procedure that keeps track of the number of messages coming through the system over regular intervals. Then the control examines the total number of messages over the interval and draws a little graph to show the amount of message traffic. Figure 10-2 shows the control in action—sampling the message traffic and sending notifications to the client application.

click to view at full size.

Figure 10-2. The message traffic control in action.

Inside Atl
Inside ATL (Programming Languages/C)
ISBN: 1572318589
EAN: 2147483647
Year: 1998
Pages: 127

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net