06-22-2007 09:26 AM
06-25-2007 04:08 AM
06-25-2007 06:35 AM - edited 06-25-2007 06:35 AM
Message Edited by Loehnert on 06-25-2007 06:38 AM
06-25-2007 10:51 AM
I am sorry, Falko, my use of the word "panel" instead of "window" was misleading...
As I can understand, your application has a user interface (I mean, it's not a "hidden" DLL that simply manages data without user interaction), so you should be able to associate a callback to your main panel either in the UIR editor or programmatically with InstallPanelCallback called after LoadPanel; in that callback you can get keyhits:
int CVICALLBACK PanelCallback (int panel, int event, void *callbackData,
int eventData1, int eventData2)
{
int asciiCode;
int virtualKey; /* cursor keys, function keys, esc, enter, etc.. */
/* are "virtual" keys. */
switch (event) {
case EVENT_KEYPRESS:
/* eventData1 contains the keypress value represented as a 4-byte */
/* integer consisting of 3 fields, 0x00MMVVAA: */
/* MM = the modifier key */
/* VV = the virtual key, masks defined in userint.h */
/* AA = the ASCII key */
/* eventData2 is a pointer to an integer which holds the actual key */
/* value. This pointer can be used to change the value of the key */
/* before the control processes it. */
asciiCode = eventData1 & VAL_ASCII_KEY_MASK;
virtualKey = eventData1 & VAL_VKEY_MASK;
// ..... your code follows
}
return 0;
}
06-26-2007 07:05 AM
06-27-2007 01:47 AM