Environment: VC6 SP4, Win2000
This little control, derived from a CButton control, displays the network traffic on a given interface. It uses the Performace API functions to enumerate the current traffic.
1. Copy files
To use this control in your project, simply copy the two classes
into your project directory (also copy the globals.h file, which includes the necessary definitions and types).
2.Create helper button
Create a CButton control in your e.g. Dialog and overwrite the type with MFNetTrafficButton.
Initialize the control with the right values. These are:
This initializes the control to monitor the interface given. You can obtain this value by calling the MFNetTraffic::GetNetworkInterfacesCount() method.
Sets the type of the traffic to monitor. Possible values are:
If you are interested in being notificated if a control changes the number of the interface.
Specifies how fast the grid should scroll and how often the control should update the network traffic information (both values are in milliseconds).