03-13-2013 01:48 AM
Hi,
I use CVI 2010 and NI Vision 2010 to develop a motion and machine vision system.
I got a problem of using the imagecontrol, I can not capture the EVENT_KEYUP,EVENT_KEYPRESS and EVENT_LEFT_CLICK, EVENT_LEFT_CLICK_UP in the image control's callback.
I also tried to use the function of InstallWinMsgCallback (g_hMainPnlHdl,WM_KEYUP,KeyupCallback,VAL_MODE_INTERCEPT,NULL,&hKeyupCbHdl) to install the WM_KEYUP event, the message is captured when the mouse pointer is outside of the image control,but when the mouse pointer entering the image control, the WM_KEYUP event is missing. I think the image control has intercepted and blocked these messages.
Anyone can help me? Thank you very much!
Awen
10-31-2013 07:33 PM
It seems to work for me. I just tested EVENT_LEFT_CLICK and had the event increment a numeric each time it fired. I just configured a callback function called "ImageCallback" in the Image control properties, then created a callback function. I have attached the whole project below.