National Instruments 320682C Musical Toy Instrument User Manual


 
Chapter 8 Utility Library
© National Instruments Corporation 8-31 LabWindows/CVI Standard Libraries
Parameters
None
Return Value
k
integer Key code.
Using This Function
The values returned are the same as the key values used in the User Interface Library. See
userint.h.
Keystroke Return Value
<b> 'b'
<Ctrl-b> (VAL_MENUKEY_MODIFIER | 'B')
<F4> VAL_F4_VKEY
<Shift-F4> (VAL_SHIFT_MODIFIER | VAL_F4_VKEY)
Note: This function returns -1 if you are running on UNIX and have done one of the
following.
Selected “Use hosts system’s standard Input/Output” in the dialog box brought up
by selecting Options » Environment in the Project window; or
Called SetStdioPort to set the port to HOST_SYSTEM_STDIO.
Example
/* Give the user a chance to quit the program */
int k;
FmtOut ("Enter 'q' to quit, any other key to continue ");
k = GetKey ();
if ((k == 0x0051) || (k == 0x0071)) /* q or Q */
exit (0);
GetModuleDir
int result = GetModuleDir (char directoryName[], void *moduleHandle);
Note: This function is available only in the Windows 95 and NT versions of
LabWindows/CVI.