キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

how to call a button’s click event programmatically

解決済み
解決策を見る
Dear All,
I would like to know how to call a button’s click event
programmatically in LabWindows/CVI.

Thank you very much,
Mariela.
0 件の賞賛
メッセージ1/5
7,360件の閲覧回数
解決策
受理者 prodna
Either you directly call the button callback or (better) use CallCtrlCallback passing the appropriate event (normally EVENT_COMMIT: it depends on which event you are handling inside the control callback).


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
メッセージ2/5
7,355件の閲覧回数

I have a follow up question.

 

the prototype is 

 

int CallCtrlCallback (int Panel, int Ctrl, int Event, int EventData1, int EventData2, int *Return_Value);

 

For an event = EVENT_COMMIT what are the meaning of values EventData1 and EventData2? Or do I just set them to NULL?

0 件の賞賛
メッセージ3/5
7,270件の閲覧回数

I have never checked what the values are when I get an EVENT_COMMIT event but I have used this function and simply set both of those to zero.

 

Works fine, I do know that for mouse clicks (not commits!) those are populated with the mouse pointer coordinates.

Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 件の賞賛
メッセージ4/5
7,247件の閲覧回数

Meaning of eventData parameters is listed in userint.h where events are defined. Several events have associated eventData values (some of them only when fired for specific control types).



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
メッセージ5/5
7,245件の閲覧回数