您的位置:首页 > 其它

关于LabWindows/CVI设计的一些知识点

2013-05-03 16:47 447 查看
++++++++++++++++++++++++++++++++++++++++

NO.01-
How Do I Quit the CVI Panel by Clicking on the " X " Button in the Title Bar?

++++++++++++++++++++++++++++++++++++++++

Problem: Why does the " X " in the CVI panel not work? How do I quit the CVI panel by clicking on the " X " button in the title bar?

Solution: The X on the CVI panel generates a CVI EVENT_CLOSE function ...

There are two ways that you can handle this :

You can place an ordinary quit callback in your code that causes your application to quit . When editing your *.uir file, double click on the panel to bring up its property page. On the left-hand side you will see a drop-down list labeled "Close Control."
Click on this list to select your desired quit callback. By default, the close control does not call anything. By making this change, you direct it to a particular callback function to quit your application.
*Note* if you are creating a new CVI panel, and use the tool
Code»Generate»All Code
to choose one callback to be your quit callback, CVI will automatically map that callback to the Close Control of the panel as well.

The second approach is to have a PANEL callback. In the callback, you should check for the EVENT_CLOSE event. If an EVENT_CLOSE is detected, call the code that will quit your program (typically you will use
the
QuitUserInterface()
function).
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: