120
CY4636 WirelessUSB™ LP Keyboard Mouse Reference Design Kit User Guide, Doc. # 001-70355 Rev. *A
A.7.2.3
WirelessUSB System Tray Application Module
The WirelessUSB System Tray module is the main system tray application. This module places the
icon on the system tray bar, manages the HID devices, displays pop up messages, and controls the
WirelessUSB Status Property Sheet. Additionally, via command-line parameters, this module can
enable and disable the system tray application from running at startup.
CWirelessUSBTrayApp Class Methods.
The CWirelessUSBTrayApp class performs application
initialization and removal, in addition it parses command-line parameters used to enable or disable
the system tray application from being run at startup.
CMainFrame Class Methods.
The CMainFrame class is the Visual C++ generated file that is a
derived frame-window class for the system tray application's main frame window. This class has
been modified to also perform the timer based polling of the WirelessUSB LP bridge HID device to
obtain the radio parameters and display any appropriate pop up messages. Additionally, this class
also processes the command message to create the WirelessUSB Status Property Sheet.
Table A-13. CWirelessUSBTrayApp Methods
Method
Type
Description
InitInstance()
Public
This method performs basic initialization and checks for any com-
mand-line parameters: if command-line parameters are found, it
takes the appropriate action and ends the application; if no command-
line parameters are found then it checks to make sure the application
is not currently running and, if not, then proceeds to run the system
tray application
ExitInstance()
Public
This method performs some standard cleanup before the application
ends
RegisterAutoLoader()
Protected
This method registers the application (itself) to always be run at startup
and optionally launches itself as well
UnregisterAudoLoader()
Protected
This method un-registers the application (itself) to prevent running at
startup and optionally ends itself from running
AutoLoadExe()
Protected
This method launches the specified EXE application
Table A-14. CMainFrame Methods
Method
Type
Description
OnCreate()
Public
This method is called when a new window is created for this frame; it sets up the
HID Notification callback, device status property sheet, initializes the HID man-
ager, creates the system tray icon, sets up the menu and tool tips, if any HID
devices are present then displays the icon on the system tray, and makes a call to
start the timer
HIDNotification()
Public
This method processes notifications of when an HID device is added or removed
from the list; it adds or removes property pages to the wireless status page and
adds or removes the icon from the system tray when the first or last HID device is
added or removed