Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Controls not responding to user actions

I have recently added some controls to theGUI I created with the CVI gui-builder.  None of the new controls "respond" to interaction from the user.  The new controls do generate events.  But never Val_changed or commint events.  And they never change their state or appearance.  They act as if they are in indicator control mode.  But I verified that they are set to Hot mode.  Also, if I remove the callback function, or change the callback function to be one of the existing callbacks in my app, the controls start to behave as expected.  Can someone please help?

Thanks,
-Arnold E.
0 Kudos
Message 1 of 6
(7,272 Views)
Hi Arnold,

So are you saying that you are running some CVI application which contains several GUI controls and clicking on these controls has no effect? Would it be possible to post a small example that demonstrates this odd behavior? What type of "new controls" did you recently add that aren't generating events? You posted in the C++ forum but you mention CVI so I'm not sure which IDE you are working with.

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 2 of 6
(7,265 Views)
Thanks for the reply.
I am using Measurement Studio with Microsoft Visual C++.  The GUI was created with the CVI gui builder.  Any time I want to make a change to the GUI, I open the uir file in CVI and modify it there.  The UIRCallbackTable.c,  MainUI.uir and MainUI.h files then get updated in my Visual C++ project.

I have added numeric controls and check box controls and neither responds to user actions.  I'll work on posting an example of the problem.


Thanks,
-Arnold E.
0 Kudos
Message 3 of 6
(7,244 Views)
Hi Arnold,

The LabWindows/CVI User Interface Updates Not Showing Up in Microsoft Visual C++ Projects KB doesn't exactly apply to your situation since you are actually seeing your UI updates, but since you are combing CVI and C++, I would recommend reading through that KB.  You may have already mentioned this earlier, but when you click on the check box controls for example, are any events fired? Can you step into the associated callback? I just did a quick test of the same steps you went through and it worked fine on my end. Therefore a small example would be helpful.

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 4 of 6
(7,236 Views)
Hi Jonathan.


It turns out that everything works fine if I make the callback functions return a 0 in all cases.  I am not sure if this is documented anywhere.  In any case, thanks for your help.

-Arnold E.
0 Kudos
Message 5 of 6
(7,230 Views)
Hello Arnold,

It sounds like you may have been Swallowing Events.  Glad to hear you've got it up and running!

NickB
National Instruments
0 Kudos
Message 6 of 6
(7,214 Views)