Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5339

GetKeyPressEventVirtualKey crashing debug

$
0
0

Referring to this post, I am trying to update a control based on numeric data being entered into a numeric control, using the EVENT_KEYPRESS event.  I am attempting to ignore non-numeric entered data (including virtual key codes).  Using the following code, I get consistent lockups of CVI 2013:

 

int temp1, temp2;

case EVENT_KEYPRESS:
	temp = GetKeyPressEventVirtualKey(eventData2);
	if (temp == 0)
		temp = isdigit(eventData1);
	else
		return -1;
	break;

 

As you can see, I even tried swallowing future events. I can set a breakpoint in this event and pass numeric data just fine.  But then when I hit a non-numeric virtual key (Home, F4, etc), after the GetKeyPressEventVirtualKey, my debugger locks up hard and is unrecoverable.

Is this a CVI bug?


Viewing all articles
Browse latest Browse all 5339

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>