Common Question 12
I want the user to be able to click a hot-spot. How do I do this?
ProEssentials has many hot-spots which the user can click or double-click.
.NET Hot-Spot Handling
For .NET developers, event listings can also be found via the .NET Reference
.NET, OCX, and VCL Hot-Spot Handling
.NET, OCX, and VCL developers respond to hot-spots via events built into the visual interface. Utilizing these events is as easy as setting the above properties to TRUE and placing your code inside the event names as follows.
Note that all hot spots provide the DblClk argument to signify whether the user clicked or double-clicked the hot spot. Also note that you can not respond to both the click and double-click events because the double-click event also initially triggers a click event.
*nRight is 0 for left y axis and 1 for right y axis.
*nTop is 0 for bottom x axis and 1 for top x axis.
*Yval and *Xval are the graph axis location in data units.
C/C++ Hot-Spot Handling
C/C++ SDK developers respond to hot-spots via the Windows notification message mechanism. This mechanism uses the WM_COMMAND message to pass notification codes in HIWORD(wParam) for 32 bit targets. You will respond to either the PEWN_CLICKED or PEWN_DBLCLICKED notification codes and then use PEvget to retrieve the PEP_structHOTSPOTDATA property. This property will inform you of the type of Hot-Spot selected (if any) and also provides information with respect to that selection. In the case of a Graph Hot-Spot (PEHS_GRAPH), you will need to retrieve the PEP_structGRAPHLOC property to determine the graph coordinates where the user clicked.
The following is a C/C++ example of responding to a Subset Hot-Spot. For those of you not familiar with the Microsoft Foundation Classes, OnCommand is a function that processes the WM_COMMAND message.
©2022 Gigasoft, Inc. | All rights reserved.
Gigasoft is a registered trademark, and ProEssentials a trademark of Gigasoft, Inc.