Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

problem of imaq image control events

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

0 Kudos
Message 1 of 2
(3,629 Views)

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.

0 Kudos
Message 2 of 2
(3,454 Views)