{"id":613,"date":"2013-03-26T21:09:00","date_gmt":"2013-03-26T13:09:00","guid":{"rendered":"http:\/\/www.liuwenhao.me\/?p=613"},"modified":"2021-11-22T14:02:44","modified_gmt":"2021-11-22T06:02:44","slug":"%e5%8e%9f%e5%88%9b%e6%95%99%e7%a8%8blabwindowscvi%e5%85%a5%e9%97%a8%e4%b9%8b%e7%ac%ac%e4%ba%8c%e7%ab%a0%ef%bc%9agui%e5%bc%80%e5%8f%91","status":"publish","type":"post","link":"https:\/\/www.liuwenhao.me\/?p=613","title":{"rendered":"[\u539f\u521b\u6559\u7a0b]LabWindows\/CVI\u5165\u95e8\u4e4b\u7b2c\u4e8c\u7ae0\uff1aGUI\u5f00\u53d1"},"content":{"rendered":"<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">\u5bfc\u822a\u76ee\u5f55<\/p><ul class=\"toc_list\"><li><a href=\"#21_GUI\">2.1 \u516d\u6b65\u6784\u5efa\u7b80\u5355\u7684GUI\u7a0b\u5e8f<\/a><ul><li><a href=\"#nbsp_211\">&nbsp; 2.1.1 \u521b\u5efa\u5de5\u7a0b\u6587\u4ef6<\/a><\/li><li><a href=\"#nbsp_212\">&nbsp; 2.1.2 \u521b\u5efa\u7528\u6237\u754c\u9762\u6587\u4ef6<\/a><\/li><li><a href=\"#nbsp_213\">&nbsp; 2.1.3 \u5728\u7528\u6237\u754c\u9762\u6587\u4ef6\u4e2d\u6dfb\u52a0\u63a7\u4ef6<\/a><\/li><li><a href=\"#nbsp_214\">&nbsp; 2.1.4 \u751f\u6210\u6846\u67b6\u6e90\u4ee3\u7801<\/a><\/li><li><a href=\"#215\">2.1.5 \u6dfb\u52a0\u56de\u8c03\u51fd\u6570<\/a><\/li><li><a href=\"#nbsp_216\">&nbsp; 2.1.6 \u8fd0\u884c\u3001\u8c03\u8bd5<\/a><\/li><\/ul><\/li><li><a href=\"#22\">2.2 \u501f\u52a9\u5e2e\u52a9\u6587\u6863\u4f7f\u7528\u66f4\u591a\u63a7\u4ef6\u66f4\u591a\u529f\u80fd<\/a><ul><li><a href=\"#nbspnbspnbsp_221_CVI\">&nbsp;&nbsp;&nbsp; 2.2.1 \u968f\u5fc3\u4f7f\u7528\u66f4\u4e30\u5bcc\u7684CVI\u63a7\u4ef6<\/a><\/li><li><a href=\"#nbspnbspnbsp_222_CVI\">&nbsp;&nbsp;&nbsp; 2.2.2 \u4f7f\u7528\u4e30\u5bcc\u7684CVI\u51fd\u6570\u5e93<\/a><\/li><li><a href=\"#nbspnbspnbsp_223_CVI\">&nbsp;&nbsp;&nbsp; 2.2.3 \u83b7\u53d6\u4e30\u5bcc\u7684CVI\u4e8b\u4ef6\u4e0e\u7528\u6237\u4ea4\u4e92<\/a><\/li><\/ul><\/li><li><a href=\"#23\">2.3 \u63a2\u7d22\u4e0e\u5b9e\u9a8c<\/a><ul><li><a href=\"#nbsp_231\">&nbsp; 2.3.1 \u5b9e\u9a8c<\/a><\/li><li><a href=\"#nbsp_232\">&nbsp; 2.3.2 \u63a2\u7a76<\/a><\/li><\/ul><\/li><\/ul><\/div>\n<h1><span id=\"21_GUI\"><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1\">2.1 \u516d\u6b65\u6784\u5efa\u7b80\u5355\u7684GUI\u7a0b\u5e8f<\/span><\/span><\/h1>\n<h4><\/h4>\n<p>\u5728\u672c\u8282\u4e2d\uff0c\u6211\u4eec\u8981\u505a\u7684\u4f8b\u5b50\u5f88\u7b80\u5355\uff0c\u662f\u521b\u5efa\u4e00\u4e2a\u5982\u4e0b\u56fe\u6240\u793a\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/1.jpg\"><img loading=\"lazy\" title=\"1\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"1\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/1_thumb.jpg\" width=\"275\" height=\"189\"><\/a><\/p>\n<p align=\"center\"><span style=\"font-size: small\">\u56fe 2\u20111 \u7a0b\u5e8f\u8fd0\u884c\u6548\u679c<\/span><\/p>\n<h2><span id=\"nbsp_211\">&nbsp; 2.1.1 \u521b\u5efa\u5de5\u7a0b\u6587\u4ef6<\/span><\/h2>\n<p>\u8fd0\u884cLabWindows\/CVI\uff0c\u5355\u51fb\u83dc\u5355<u>F<\/u>ile-<u>N<\/u>ew-<u>P<\/u>roject(*.prj)\u2026\uff0c\u5c06\u4f1a\u51fa\u73b0\u65b0\u5efa\u5de5\u7a0b\u7684\u9009\u9879\u5bf9\u8bdd\u6846\u3002\u5728\u5bf9\u8bdd\u6846\u4e2d\u53ef\u4ee5\u9009\u62e9\u662f\u5426\u540c\u65f6\u65b0\u5efa\u4e00\u4e2a\u5de5\u4f5c\u7a7a\u95f4\uff0c\u662f\u5426\u4fdd\u6301\u8ddf\u4e0a\u4e2a\u5de5\u7a0b\u540c\u6837\u7684\u914d\u7f6e\u3002<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/2.jpg\"><img loading=\"lazy\" title=\"2\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"2\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/2_thumb.jpg\" width=\"361\" height=\"355\"><\/a><\/p>\n<p align=\"center\"><span style=\"font-size: small\">\u56fe 2\u20112 \u521b\u5efa\u65b0\u7684\u5de5\u7a0b<\/span><\/p>\n<p><!--more--><\/p>\n<h2><span id=\"nbsp_212\">&nbsp; 2.1.2 \u521b\u5efa\u7528\u6237\u754c\u9762\u6587\u4ef6<\/span><\/h2>\n<p>\u5355\u51fb\u83dc\u5355<u>F<\/u>ile-<u>N<\/u>ew-<u>U<\/u>ser Interface(*.uir)\u2026\uff0c\u5c06\u4f1a\u5f39\u51fa\u7528\u6237\u754c\u9762\u7f16\u8f91\u5668\u3002\u7528\u6237\u754c\u9762\u7f16\u8f91\u5668\u662f\u4e00\u4e2a\u5229\u7528\u4ea4\u4e92\u5f0f\u62d6\u653e\u63a7\u4ef6\u7684\u65b9\u6cd5\u6765\u8bbe\u8ba1\u56fe\u5f62\u7528\u6237\u754c\u9762\u7684\u7f16\u8f91\u5668\u3002\u5bf9\u4e8e\u4e00\u4e2a\u65b0\u5efa\u7684\u7528\u6237\u754c\u9762\u6587\u4ef6\uff0c\u7f16\u8f91\u5668\u5c06\u81ea\u52a8\u4ea7\u751f\u4e00\u4e2a\u7a7a\u9762\u677f\uff0c\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/3.jpg\"><img loading=\"lazy\" title=\"3\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"3\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/3_thumb.jpg\" width=\"578\" height=\"445\"><\/a><\/p>\n<p align=\"center\"><a name=\"_Ref350433853\"><\/a><span style=\"font-size: small\">\u56fe<\/span> <span style=\"font-size: small\">2\u20113 \u7528\u6237\u754c\u9762\u7f16\u8f91\u5668\u7a97\u53e3<\/span><\/p>\n<p>\u53cc\u51fb\u9762\u677f \uff0c\u5f39\u51fa\u5c5e\u6027\u7f16\u8f91\u6846\u3002\u5728\u5c5e\u6027\u7f16\u8f91\u6846\u4e2d\u53ef\u4ee5\u4fee\u6539\u7a0b\u5e8f\u7684\u6807\u9898\u3001\u7a97\u53e3\u4f4d\u7f6e\u3001\u7a97\u53e3\u6309\u94ae\/\u83dc\u5355\u3001\u7a97\u53e3\u98ce\u683c\u7b49\u7279\u6027\u3002<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/4.jpg\"><img loading=\"lazy\" title=\"4\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"4\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/4_thumb.jpg\" width=\"644\" height=\"495\"><\/a><\/p>\n<p align=\"center\"><span style=\"font-size: small\">\u56fe 2\u20114 \u5c5e\u6027\u7f16\u8f91\u6846<\/span><\/p>\n<p>\u521d\u59cb\u72b6\u6001\u4e0b\uff0c\u9762\u677f\u5c5e\u6027\u5bf9\u8bdd\u6846\u7684Callback <u>F<\/u>unction\uff08\u56de\u8c03\u51fd\u6570\uff09\u7559\u7a7a\u3002\u6b64\u5904\u53ef\u4ee5\u586b\u5199\u56de\u8c03\u51fd\u6570\u7684\u540d\u79f0\uff08\u6b64\u793a\u4f8b\u586b\u5199\u201cMainCallBack\u201d\uff09\uff0c\u4ee5\u65b9\u4fbf\u540e\u9762\u6dfb\u52a0\u7a97\u53e3\u5173\u95ed\u3001\u7a97\u53e3\u6fc0\u6d3b\u6216\u8005\u5931\u6d3b\u7684\u54cd\u5e94\u4ee3\u7801\u3002<\/p>\n<h2><span id=\"nbsp_213\">&nbsp; 2.1.3 \u5728\u7528\u6237\u754c\u9762\u6587\u4ef6\u4e2d\u6dfb\u52a0\u63a7\u4ef6<\/span><\/h2>\n<p>\u5728\u8be5\u7a97\u53e3\u4e2dUntitled Panel\u7684\u7070\u8272\u533a\u57df\u4e2d\u5355\u51fb\u9f20\u6807\u53f3\u952e\uff0c\u4fbf\u4f1a\u5f39\u51fa\u4e00\u4e2a\u5982\u56fe 2\u20115\u6240\u793a\u7684\u63a7\u4ef6\u9009\u62e9\u7684\u5feb\u6377\u83dc\u5355\u3002LabWindows\/CVI \u7684\u63a7\u4ef6\u79cd\u7c7b\u89c1\u8868 2\u20111\u3002<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/5.jpg\"><img loading=\"lazy\" title=\"5\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"5\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/5_thumb.jpg\" width=\"205\" height=\"307\"><\/a><\/p>\n<p align=\"center\"><a name=\"_Ref350458515\"><\/a><span style=\"font-size: small\">\u56fe<\/span> <span style=\"font-size: small\">2\u20115 \u63a7\u4ef6\u83dc\u5355<\/span><\/p>\n<p>\u4ece\u8be5\u83dc\u5355\u4e2d\u9009\u62e9\u6240\u9700\u7684\u63a7\u4ef6\uff0c\u5e76\u6446\u653e\u5230\u9762\u677f\u7684\u9002\u5f53\u4f4d\u7f6e\uff08\u4e5f\u53ef\u901a\u8fc7Create \u83dc\u5355\u9879\u6765\u5b9e\u73b0\u4e0a\u8ff0\u64cd\u4f5c\uff09\u3002\u6bcf\u4e2a\u63a7\u4ef6\u901a\u8fc7\u4e00\u7cfb\u5217\u5c5e\u6027\u8bbe\u7f6e\u5bf9\u8bdd\u6846\u6765\u8bbe\u5b9a\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u63a7\u4ef6\u7684\u5c5e\u6027\u6765\u6539\u53d8\u5176\u5916\u89c2\u3001\u8bbe\u7f6e\u3001\u70ed\u952e\u548c\u6807\u7b7e\u7b49\u3002<\/p>\n<p>\u5728\u6b64\uff0c\u6211\u4eec\u9009\u62e9\u6dfb\u52a0\u4e24\u4e2aNumeric\u83dc\u5355\u4e0b\u7684Numeric\u63a7\u4ef6\uff0c\u6dfb\u52a0\u4e00\u4e2a<u>T<\/u>ext\u83dc\u5355\u4e0b\u7684String\u63a7\u4ef6\uff0c<u>C<\/u>ommand Button\u83dc\u5355\u4e0b\u7684Square Command Button\u63a7\u4ef6\u3002\u6dfb\u52a0\u5b8c\u6bd5\u540e\uff0c\u53cc\u51fb\u63a7\u4ef6\uff08\u6216\u8005\u53f3\u51fb-Edit Control\uff09\u4fee\u6539\u63a7\u4ef6\u7684\u76f8\u5173\u5c5e\u6027\u3002<\/p>\n<p>\u5206\u522b\u5728\u5c5e\u6027\u7f16\u8f91\u6846\u4e2d\uff0c\u5c06\u4e24\u4e2aNumeric\u63a7\u4ef6\u7684<u>C<\/u>onstant Name\u5c5e\u6027\u4fee\u6539\u4e3a\u201cPARA_A\u201d\u3001\u201cPARA_B\u201d\uff0cLabel Appearance\u7684<u>L<\/u>abel\u5c5e\u6027\u4fee\u6539\u4e3a\u201c\u53c2\u6570A\u201d\u3001\u201c\u53c2\u6570B\u201d\u3002\u5c06String\u63a7\u4ef6\u7684<u>C<\/u>onstant Name\u5c5e\u6027\u4fee\u6539\u4e3a\u201cRESULT\u201d\uff0cLabel Appearance\u7684<u>L<\/u>abel\u5c5e\u6027\u4fee\u6539\u4e3a\u201cA+B\u201d\u3002\u5c06Command Button\u63a7\u4ef6\u7684<u>C<\/u>onstant Name\u5c5e\u6027\u4fee\u6539\u4e3a\u201cCALCULATE\u201d\uff0cCallback <u>F<\/u>unction\u5c5e\u6027\u4fee\u6539\u4e3a\u201cCalculate\u201d\uff0c\u4ee5\u65b9\u4fbf\u540e\u9762\u751f\u6210\u56de\u8c03\u51fd\u6570\u3002<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/6.jpg\"><img loading=\"lazy\" title=\"6\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"6\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/6_thumb.jpg\" width=\"644\" height=\"439\"><\/a><\/p>\n<p align=\"center\"><span style=\"font-size: small\">\u56fe 2\u20116 \u4fee\u6539\u63a7\u4ef6\u7684\u5c5e\u6027<\/span><\/p>\n<p>\u5f53\u7136\uff0c\u4e3a\u4e86\u7f8e\u89c2\uff0c\u53ef\u4ee5\u5728Quick Edit Window\u4e2d\u4fee\u6539\u6309\u94ae\u7b49\u63a7\u4ef6\u7684\u80cc\u666f\u989c\u8272\uff0c\u5728Label Appearance\u4e2d\u4fee\u6539\u6309\u94ae\u4e2d\u6587\u5b57\u7684\u989c\u8272\u3002\u4e0a\u56fe\u4e2dOK\u6309\u94ae\u5373\u666e\u901a\u6309\u94ae\u4fee\u6539\u989c\u8272\u4e4b\u540e\u7684\u6548\u679c\u3002<\/p>\n<h2><span id=\"nbsp_214\">&nbsp; 2.1.4 \u751f\u6210\u6846\u67b6\u6e90\u4ee3\u7801<\/span><\/h2>\n<p>\u5728\u7528\u6237\u754c\u9762\u7f16\u8f91\u7a97\u53e3\u4e2d\uff0c\u9009\u62e9\u83dc\u5355Co<u>d<\/u>e-<u>G<\/u>enerate-<u>A<\/u>ll Code\uff0c\u6b64\u65f6\u5c06\u4f1a\u5f39\u51fa\u4e00\u4e2a\u63d0\u793a\u5b58\u50a8.uir\u6587\u4ef6\u7684\u5bf9\u8bdd\u6846\uff0c\u5728\u6b64\u6211\u4eec\u5b58\u4e3a1.uir\uff08CVI\u5c06\u4f1a\u751f\u6210\u540c\u540d\u7684.h\u6587\u4ef6\u3002\u4e0d\u5efa\u8bae\u5927\u5bb6\u50cf\u793a\u4f8b\u4e00\u6837\u8d77\u65e0\u610f\u4e49\u7684\u547d\u540d\uff09\u3002\u4fdd\u5b58\u540eCVI\u4f1a\u5f39\u51fa\u751f\u6210\u4ee3\u7801\u7684\u5bf9\u8bdd\u6846\uff0c\u4e00\u822c\u60c5\u51b5\u4e0b\u76f4\u63a5\u70b9\u51fbOK\uff0c\u6846\u67b6\u6e90\u4ee3\u7801\u4f1a\u81ea\u52a8\u4fdd\u5b58\u5728\u8ddf.uir\u540c\u540d\u7684C\u6587\u4ef6\u4e2d\u3002<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/7.jpg\"><img loading=\"lazy\" title=\"7\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"7\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/7_thumb.jpg\" width=\"482\" height=\"539\"><\/a><\/p>\n<p align=\"center\"><span style=\"font-size: small\">\u56fe 2\u20117 \u751f\u6210\u6240\u6709\u4ee3\u7801<\/span><\/p>\n<p>\u81f3\u6b64\uff0c\u6211\u4eec\u70b9\u51fb\u83dc\u5355<u>R<\/u>un-<u>D<\/u>ebug Project\u4e4b\u540e\uff0c\u7a0b\u5e8fUI\u5df2\u7ecf\u53ef\u4ee5\u8fd0\u884c\u4e86\u3002\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b\u56fe\u6240\u793a\u3002\u5f53\u7136\u4e86\uff0c\u56e0\u4e3a\u5c1a\u672a\u7f16\u5199\u6309\u94ae\u7684\u56de\u8c03\u51fd\u6570\u7684\u54cd\u5e94\u4ee3\u7801\uff0c\u6b64\u65f6\u70b9\u51fb\u4efb\u4f55\u6309\u94ae\u90fd\u4e0d\u4f1a\u6267\u884c\u5bf9\u5e94\u7684\u64cd\u4f5c\u3002<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/8.jpg\"><img loading=\"lazy\" title=\"8\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"8\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/8_thumb.jpg\" width=\"275\" height=\"189\"><\/a><\/p>\n<p align=\"center\"><span style=\"font-size: small\">\u56fe 2\u20118 \u7a0b\u5e8fUI\u8fd0\u884c\u7ed3\u679c<\/span><\/p>\n<h2><span id=\"215\"><strong>2.1.5 \u6dfb\u52a0\u56de\u8c03\u51fd\u6570<\/strong><\/span><\/h2>\n<p>\u751f\u6210\u6846\u67b6\u4ee3\u7801\u4e4b\u540e\uff0c\u6211\u4eec\u5e94\u8be5\u53ef\u4ee5\u5728uir\u540c\u540d\u7684C\u6587\u4ef6\u4e2d\u770b\u5230CVI\u4e3a\u6211\u4eec\u751f\u6210\u4e86\u5982\u4e0b\u4ee3\u7801\uff1a<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/9.jpg\"><img loading=\"lazy\" title=\"9\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"9\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/9_thumb.jpg\" width=\"446\" height=\"644\"><\/a><\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/10.jpg\"><img loading=\"lazy\" title=\"10\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"10\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/10_thumb.jpg\" width=\"559\" height=\"211\"><\/a><\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u5728CVI\u4e3a\u6211\u4eec\u751f\u6210\u7684\u6846\u67b6\u4e2d\u6dfb\u52a0\u6216\u4fee\u6539\u4ee3\u7801\uff0c\u4ee5\u5b9e\u73b0\u5177\u4f53\u7684\u529f\u80fd\u3002\u5728\u6dfb\u52a0\u6216\u4fee\u6539\u4ee3\u7801\u4e4b\u524d\uff0c\u6211\u4eec\u5148\u6765\u9010\u4e00\u5206\u6790CVI\u751f\u6210\u7684\u6846\u67b6\u4ee3\u7801\u505a\u4e86\u4ec0\u4e48\u3002<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/11.jpg\"><img loading=\"lazy\" title=\"11\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"11\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/11_thumb.jpg\" width=\"561\" height=\"125\"><\/a><\/p>\n<p>cvirte.h\u3001userint.h\u5206\u522b\u662fCVI\u8fd0\u884c\u65f6\u5e93\uff08CVI Run-Time Engine\uff09\u3001CVI\u7528\u6237\u754c\u9762\u5e93\uff08CVI User Interface\uff09\u7684\u5934\u6587\u4ef6\uff0c\u5206\u522b\u5305\u542b\u4e86CVI\u6846\u67b6\u8fd0\u884c\u3001CVI\u7528\u6237\u754c\u9762\u8fd0\u884c\u6240\u9700\u8981\u7684\u57fa\u672c\u51fd\u6570\u7684\u58f0\u660e\u4e0e\u5b9a\u4e49\u30021.h\u662f\u754c\u9762\u6587\u4ef61.uir\u7684\u5934\u6587\u4ef6\u5e93\uff0c\u5305\u542b\u4e86\u754c\u9762\u4e2d\u7684\u63a7\u4ef6\u7684\u5b9a\u4e49\u4e0e\u58f0\u660e\u3002\u800cpanelHandle\u4e3a\u9762\u677f\u7684\u5168\u5c40\u53e5\u67c4\uff0c\u5f53\u5bf9\u9762\u677f\u6216\u8005\u9762\u677f\u4e0a\u7684\u63a7\u4ef6\u8fdb\u884c\u64cd\u4f5c\u65f6\u7ecf\u5e38\u7528\u5230\u3002<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/12.jpg\"><img loading=\"lazy\" title=\"12\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"12\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/12_thumb.jpg\" width=\"557\" height=\"251\"><\/a><\/p>\n<p>main\u51fd\u6570\u662f\u7528\u6237\u7a0b\u5e8f\u8fd0\u884c\u65f6\u9996\u5148\u88ab\u6267\u884c\u7684\u51fd\u6570\u3002main\u51fd\u6570\u5b9e\u73b0\u7684\u529f\u80fd\u5206\u522b\u662fCVI\u8fd0\u884c\u5f15\u64ce\u521d\u59cb\u5316\uff08InitCVIRTE\u51fd\u6570\uff09\u3001\u52a0\u8f7d\u9762\u677f\uff08LoadPanel\u51fd\u6570\uff09\u3001\u663e\u793a\u9762\u677f\uff08DisplayPanel\u51fd\u6570\uff09\u3001\u5f00\u59cb\u6d88\u606f\u961f\u5217\u5faa\u73af\uff08RunUserInterface\u51fd\u6570\uff09\u3002\u5176\u4e2dRunUserInterface\u4f1a\u4e0d\u65ad\u7684\u68c0\u67e5\u9762\u677f\u7684\u6d88\u606f\u6216\u8005\u64cd\u4f5c\u7cfb\u7edf\u53d1\u9001\u7684\u6d88\u606f\uff0c\u6c38\u8fdc\u4e0d\u4f1a\u8fd4\u56de\uff0c\u9664\u975e\u7528\u6237\u4e3b\u52a8\u8c03\u7528QuitUserInterface\u51fd\u6570\u4e2d\u6b62\u6d88\u606f\u5faa\u73af\u3002\u6240\u4ee5\uff0c\u6b63\u5e38\u8fd0\u884c\u72b6\u6001\u4e0b\uff0cmain\u51fd\u6570\u4e2d\u7684DiscardPanel\u6c38\u8fdc\u4e0d\u4f1a\u88ab\u6267\u884c\uff0cmain\u51fd\u6570\u6c38\u8fdc\u4e0d\u4f1a\u9000\u51fa\uff0c\u76f4\u5230\u7a0b\u5e8f\u88ab\u5173\u95ed\u3002<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/13.jpg\"><img loading=\"lazy\" title=\"13\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"13\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/13_thumb.jpg\" width=\"551\" height=\"385\"><\/a><\/p>\n<p>MainCallBack\u662f\u6211\u4eec\u5728\u9762\u677f\u5c5e\u6027\u7f16\u8f91\u6846\u4e2d\u586b\u5199\u7684Callback <u>F<\/u>unction\u7684\u540d\u5b57\uff0c\u8d1f\u8d23\u6267\u884c\u4e3b\u7a0b\u5e8f\u9762\u677f\u6d88\u606f\u7684\u54cd\u5e94\u4ee3\u7801\u3002\u5728switch\u8bed\u53e5\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff0cCVI\u5df2\u7ecf\u4e8b\u5148\u4e3a\u6211\u4eec\u751f\u6210\u597d\u4e86\u4e09\u4e2a\u9762\u677f\u6700\u5e38\u7528\u7684\u4e8b\u4ef6\uff1aEVENT_GOT_FOCUS\u3001EVENT_LOST_FOCUS\u4ee5\u53caEVENT_CLOSE\u3002\u5206\u522b\u5728\u5bf9\u5e94\u7684case\u4e2d\u6dfb\u52a0\u4ee3\u7801\uff0c\u5373\u53ef\u5728\u7a97\u53e3\u88ab\u6fc0\u6d3b\u3001\u7a97\u53e3\u5931\u6d3b\u3001\u4ee5\u53ca\u70b9\u51fb\u7a97\u53e3\u53f3\u4e0a\u89d2\u201c\u5173\u95ed\u201d\u6309\u94ae\u65f6\u6267\u884c\u7684\u4ee3\u7801\u3002<\/p>\n<p>CVI\u521d\u5b66\u8005\u53ef\u80fd\u4f1a\u88abMainCallBack\u524d\u9762\u7684\u4ece\u672a\u89c1\u8fc7\u7684CVICALLBACK\u5413\u5012\u3002\u5176\u5b9e\u6211\u4eec\u53ea\u9700\u8981\u9009\u4e2dCVICALLBACK\u4e4b\u540e\u53f3\u51fb\uff0c\u9009\u62e9Go To <u>D<\/u>efination\u5373\u53ef\u770b\u5230\uff1a<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/14.jpg\"><img loading=\"lazy\" title=\"14\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"14\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/14_thumb.jpg\" width=\"554\" height=\"38\"><\/a><\/p>\n<p>CVICDECL\u4ecd\u7136\u4e0d\u662f\u6211\u4eec\u7684C\u8bed\u8a00\u5173\u952e\u5b57\u3002\u7ee7\u7eed\u9009\u4e2dCVICDECL\u4e4b\u540e\u53f3\u51fb\uff0c\u9009\u62e9Go To <u>D<\/u>efination\u67e5\u770bCVICDECL\u7684\u539f\u578b\uff1a<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/15.jpg\"><img loading=\"lazy\" title=\"15\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"15\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/15_thumb.jpg\" width=\"585\" height=\"38\"><\/a><\/p>\n<p>\u81f3\u6b64\uff0cCVICALLBACK\u771f\u76f8\u5927\u767d\u3002\u5176\u5b9eCVICALLBACK\u53ea\u662f__cdecl\u7684\u5b8f\u5b9a\u4e49\u3002\u4ec0\u4e48\uff1f\u4e0d\u61c2__cdecl\u662f\u4ec0\u4e48\u610f\u601d\uff1f\u8d76\u7d27\u62ff\u8d77\u624b\u4e2d\u7684\u624b\u673a\uff0c\u8bbf\u95eeGoogle\u641e\u6e05\u695a\u5b83\u4eec\u7684\u795e\u5947\u529f\u6548\u5427\uff01<\/p>\n<p>CVI\u521d\u5b66\u8005\u4e5f\u53ef\u80fd\u88abMainCallBack\u540e\u9762\u8ddf\u7740\u7684\u4e00\u5806\u53c2\u6570\u5413\u5012\uff0c\u4e0d\u77e5\u9053\u4ed6\u4eec\u662f\u505a\u4f55\u7528\uff0c\u201c\u4e0d\u7ba1\u4ed6\u4eec\u884c\u4e0d\u884c\u201d\u3002panel\u597d\u7406\u89e3\uff0c\u5c31\u662f\u6d88\u606f\u53d1\u751f\u6240\u5728\u7684\u9762\u677f\u7684\u53e5\u67c4\u3002callbackData\u8868\u793a\u6d88\u606f\u53d1\u51fa\u65f6\u6240\u9644\u5e26\u7684\u6570\u636e\u3002\u53ef\u662feventData1\u4ee5\u53caeventData2\u5374\u5bb9\u6613\u8ba9\u521d\u5b66\u8005\u4e91\u91cc\u96fe\u91cc\u3002\u5176\u5b9e\u6211\u4eec\u53ea\u9700\u8981\u9009\u4e2d\u4efb\u610fcase\u8bed\u53e5\u4e2d\u7684\u4e8b\u4ef6\uff08\u6b64\u5904\u53ef\u4ee5\u9009\u62e9EVENT_GOT_FOCUS\uff09\uff0c\u53f3\u51fb\u9009\u62e9Go To <u>D<\/u>efination\u4e4b\u540e\u5373\u53ef\u53d1\u73b0\uff0cCVI User Interface\u7684\u4e8b\u4ef6\u5b9a\u4e49\u5168\u5728\u8fd9\u91cc\u3002\u5bf9eventData1\u4ee5\u53caeventData2\u7684\u8bf4\u660e\uff0c\u4e5f\u5728\u5b9a\u4e49\u7684\u6ce8\u91ca\u4e2d\u6709\u6240\u8bf4\u660e\u3002<\/p>\n<p>\u5728\u6b64\uff0c\u4e3a\u4e86\u8ba9\u7528\u6237\u70b9\u51fb\u7a0b\u5e8f\u53f3\u4e0a\u89d2\u7684\u5173\u95ed\u6309\u94ae\u65f6\uff0c\u7a0b\u5e8f\u53ef\u4ee5\u987a\u5229\u5173\u95ed\uff0c\u5728case EVENT_CLOSE\u8bed\u53e5\u540e\u9762\u6dfb\u52a0QuitUserInterface\u51fd\u6570\uff1a<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/16.jpg\"><img loading=\"lazy\" title=\"16\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"16\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/16_thumb.jpg\" width=\"558\" height=\"76\"><\/a><\/p>\n<p>Calculate\u51fd\u6570\u662f\u6211\u4eec\u5728\u9762\u677f\u4e2d\u521b\u5efa\u7684\u6309\u94ae\uff08Command Button\uff09\u63a7\u4ef6\u7684\u6d88\u606f\u54cd\u5e94\u51fd\u6570\uff0c\u51fd\u6570\u6846\u67b6\u8ddf\u524d\u9762\u7684\u4e3b\u9762\u677f\u7684\u6d88\u606f\u54cd\u5e94\u51fd\u6570\u7c7b\u4f3c\u3002\u6211\u4eec\u9700\u8981\u5728\u6b64\u6dfb\u52a0\u6309\u94ae\u6309\u4e0b\u4e4b\u540e\u9700\u8981\u6267\u884c\u7684\u4ee3\u7801\u3002Calculate\u51fd\u6570\u6dfb\u52a0\u54cd\u5e94\u4e4b\u540e\u7684\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/17.jpg\"><img loading=\"lazy\" title=\"17\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"17\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/17_thumb.jpg\" width=\"562\" height=\"364\"><\/a><\/p>\n<p>\u9700\u8981\u63d0\u9192\u5927\u5bb6\u7684\u662f\uff0c\u4f5c\u4e3aCVI\u7684\u521d\u5b66\u8005\uff0c\u8bf7\u5728\u5bf9\u7167\u793a\u4f8b\u8fdb\u884c\u5b9e\u9645\u64cd\u4f5c\u65f6\uff0c\u4e0d\u8981\u76f4\u63a5Copy+Paste\u4e0a\u9762\u7684\u4ee3\u7801\u3002\u81ea\u5df1\u5bf9\u7167\u7740\u4e0a\u9762\u7684\u4ee3\u7801\u4e00\u4e2a\u5b57\u6bcd\u4e00\u4e2a\u5b57\u6bcd\u7684\u6572\u8fdb\u53bb\uff0c\u4f1a\u5bf9\u624e\u5b9e\u3001\u7262\u56fa\u7684\u5b66\u4e60\u638c\u63e1CVI\u5177\u6709\u5f88\u5927\u7684\u5e2e\u52a9\u7684\u3002<\/p>\n<p>GetCtrlVal\u662f\u83b7\u53d6\u63a7\u4ef6\u7684\u5f53\u524d\u503c\u7684\u51fd\u6570\uff0c\u5176\u51fd\u6570\u58f0\u660e\u5982\u4e0b\uff1a<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/18.jpg\"><img loading=\"lazy\" title=\"18\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"18\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/18_thumb.jpg\" width=\"578\" height=\"37\"><\/a><\/p>\n<p>\u5176\u4e2dvalue\u4e3a\u63a7\u4ef6\u7684\u5f53\u524d\u503c\u53d8\u91cf\u7684\u6307\u9488\u3002panelHandle\u53c2\u6570\u4e3a\u51fd\u6570\u9762\u677f\u7684\u53e5\u67c4\uff0c\u4e4b\u524d\u5df2\u7ecf\u63d0\u5230\u3002\u53ef\u662f\u63a7\u4ef6\u7684\u53e5\u67c4controlID\u5982\u4f55\u83b7\u5f97\u5462\uff1f<\/p>\n<p>\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u5c31\u662f\uff0c\u63a7\u4ef6\u7684\u53e5\u67c4\u5373[\u63a7\u4ef6\u6240\u5728\u7684\u9762\u677f\u7684<u>C<\/u>onstant Name]_[\u63a7\u4ef6\u7684<u>C<\/u>onstant Name]\u3002\u82e5\u63a7\u4ef6\u6240\u5728\u9762\u677f\u7684<u>C<\/u>onstant Name\u4e3aPANEL\uff0c\u63a7\u4ef6\u7684<u>C<\/u>onstant Name\u4e3aNAME\uff0c\u90a3\u4e48\u63a7\u4ef6\u7684\u53e5\u67c4\u5373\u4e3aPANEL_NAME\u3002\u5176\u4e2d\uff0c\u9762\u677f\u6216\u8005\u63a7\u4ef6\u7684<u>C<\/u>onstant Name\u90fd\u53ef\u4ee5\u901a\u8fc7\u53cc\u51fb\u9762\u677f\u6216\u8005\u53cc\u51fb\u63a7\u4ef6\u6765\u8fdb\u884c\u8bbe\u7f6e\u3002<\/p>\n<p>\u53e6\u5916\u4e00\u79cd\u65b9\u6cd5\u5373\u6253\u5f00.uir\u540c\u540d\u7684.h\u6587\u4ef6\uff0c\u67e5\u627e\u5bf9\u5e94\u7684\u63a7\u4ef6\u7684\u5b9a\u4e49\u3002\u6211\u4eec\u57281.h\u6587\u4ef6\u4e2d\u53d1\u73b0\u5982\u4e0b\u4ee3\u7801\uff1a<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/19.jpg\"><img loading=\"lazy\" title=\"19\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"19\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/19_thumb.jpg\" width=\"580\" height=\"36\"><\/a><\/p>\n<p>\u5373\u53ef\u5f97\u77e5\uff0c\u201c\u53c2\u6570A\u201d\u63a7\u4ef6\u7684\u53e5\u67c4\u4e3aPANEL_PARA_A\u3002<\/p>\n<p>SetCtrlVal\u662f\u8bbe\u7f6e\u63a7\u4ef6\u7684\u5f53\u524d\u503c\u7684\u51fd\u6570\uff0c\u5176\u51fd\u6570\u58f0\u660e\u5982\u4e0b\uff1a<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/20.jpg\"><img loading=\"lazy\" title=\"20\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"20\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/20_thumb.jpg\" width=\"567\" height=\"34\"><\/a><\/p>\n<p>\u540cGetCtrlVal\u4e00\u6837\uff0c\u8c03\u7528SetCtrlVal\u5e76\u586b\u5165\u9762\u677f\u3001\u63a7\u4ef6\u53e5\u67c4\u4e4b\u540e\u5373\u53ef\u8bbe\u7f6e\u63a7\u4ef6\u7684\u503c\u3002<\/p>\n<p>GetCtrlVal\u3001SetCtrlVal\u3001GetCtrlAttribute\u4ee5\u53caSetCtrlAttribute\u56db\u4e2a\u51fd\u6570\uff0c\u662f\u5bf9\u51e0\u4e4e\u6240\u6709\u63a7\u4ef6\u90fd\u9002\u7528\u7684\u51fd\u6570\uff0c\u5728CVI\u7684GUI\u7a0b\u5e8f\u4e2d\uff0c\u4f7f\u7528\u6781\u5176\u9891\u7e41\uff0c\u662f\u5b66\u4e60CVI\u7684GUI\u7f16\u7a0b\u5fc5\u987b\u638c\u63e1\u7684\u56db\u4e2a\u51fd\u6570\u3002<\/p>\n<h2><span id=\"nbsp_216\">&nbsp; 2.1.6 \u8fd0\u884c\u3001\u8c03\u8bd5<\/span><\/h2>\n<p>\u70b9\u51fb\u83dc\u5355<u>R<\/u>un-<u>D<\/u>ebug Project\uff08\u6216\u70b9\u51fb\u5de5\u5177\u680f\u7684\u7eff\u8272\u4e09\u89d2\u5f62\u6309\u94ae\uff09\u5373\u53ef\u76f4\u63a5\u7f16\u8bd1\u5e76\u8fd0\u884c\u5f53\u524d\u5de5\u7a0b\uff0c\u540c\u65f6\u4e5f\u53ef\u4ee5\u5728\u5de5\u7a0b\u6240\u5728\u76ee\u5f55\u4e0b\u751f\u6210exe\u6587\u4ef6\u3002<\/p>\n<p>\u53f3\u51fb\u5de5\u7a0b\u540d\u5e76\u9009\u62e9Build\uff08\u6216\u70b9\u51fb\u83dc\u5355<u>B<\/u>uild-Create Debuggab<u>l<\/u>e Executable\uff09\u5373\u53ef\u7f16\u8bd1\u5e76\u751f\u6210exe\u6587\u4ef6\u3002<\/p>\n<p>\u5728CVI\u4ee3\u7801\u7f16\u8f91\u7a97\u53e3\u4e2d\u5355\u51fb\u4ee3\u7801\u524d\u7a7a\u767d\u90e8\u5206\u6216\u8005\u6309F9\u6309\u952e\uff0c\u5219\u53ef\u4ee5\u5728\u5bf9\u5e94\u7684C\u8bed\u8a00\u8bed\u53e5\u5904\u8bbe\u7f6e\u65ad\u70b9\u3002<\/p>\n<p>\u5728\u7a0b\u5e8f\u4e2d\u65ad\u65f6\uff0c\u5355\u51fb\u83dc\u5355<u>W<\/u>indow\u5373\u53ef\u63a7\u5236\u5f00\u542f\u6216\u5173\u95edMemory\uff08\u5185\u5b58\uff09\u3001Variables\uff08\u53d8\u91cf\uff09\u3001Watch\uff08\u76d1\u63a7\uff09\u7a97\u53e3\uff0c\u901a\u8fc7\u67e5\u770b\u6216\u8005\u4fee\u6539\u5bf9\u5e94\u7684\u53c2\u6570\u7684\u503c\u6765\u65b9\u4fbf\u7684\u8c03\u8bd5\u7a0b\u5e8f\u3002<\/p>\n<p>\u5728\u672c\u8282\u4e2d\uff0c\u6211\u4eec\u5df2\u7ecf\u901a\u8fc7\u7f16\u5199\u5e76\u8fd0\u884c\u4e00\u4e2aGUI\u7684\u5b9e\u4f8b\uff0c\u4e86\u89e3\u4e86\u5728CVI\u4e0b\u7528C\u8bed\u8a00\u5f00\u53d1GUI\u7a0b\u5e8f\u7684\u57fa\u672c\u8fc7\u7a0b\u3002\u81f3\u6b64\uff0c\u5927\u5bb6\u5df2\u7ecf\u7b97\u662f\u5bf9CVI\u5165\u95e8\u4e86\uff0c\u5927\u5bb6\u5df2\u7ecf\u53ef\u4ee5\u5c1d\u8bd5\u7740\u81ea\u884c\u5f00\u53d1\u4e00\u4e9b\u6709\u7528\u3001\u597d\u73a9\u7684\u7a0b\u5e8f\u4e86\u3002<\/p>\n<h1><span id=\"22\"><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1\">2.2 \u501f\u52a9\u5e2e\u52a9\u6587\u6863\u4f7f\u7528\u66f4\u591a\u63a7\u4ef6\u66f4\u591a\u529f\u80fd<\/span><\/span><\/h1>\n<h4><\/h4>\n<p>\u4e00\u822c\u8f6f\u4ef6\u5728\u8bbe\u8ba1\u65f6\u90fd\u4f1a\u9075\u5faa\u4e8c\u516b\u5b9a\u5f8b\uff0c\u537380%\u7684\u4eba\u901a\u5e38\u53ea\u4f7f\u7528\u4e00\u4e2a\u8f6f\u4ef620%\u7684\u529f\u80fd\uff0c\u4f46\u662f\u53e6\u591680%\u7684\u529f\u80fd\u5374\u5bf920%\u7684\u4eba\u6765\u8bf4\u5f88\u91cd\u8981\u3002\u5bf9\u4e8eCVI\u521d\u5b66\u8005\u4e5f\u4e00\u6837\uff0c\u4efb\u4f55\u6559\u7a0b\u53ea\u4f1a\u544a\u8bc9\u521d\u5b66\u800520%\u7684\u529f\u80fd\u5982\u4f55\u53bb\u4f7f\u7528\uff0c\u800c\u5269\u4e0b\u768480%\u7684\u529f\u80fd\u53ea\u80fd\u7531\u4f7f\u7528\u8005\u6839\u636eCVI\u8f6f\u4ef6\u63d0\u4f9b\u7684\u5e2e\u52a9\u6587\u6863\u6216\u8005\u81ea\u884c\u67e5\u627e\u76f8\u5173\u7684\u8d44\u6599\u6765\u4f7f\u7528\/\u5b9e\u73b0\u3002<\/p>\n<p>\u6388\u4e4b\u4ee5\u9c7c\u4e0d\u5982\u6388\u4e4b\u4ee5\u6e14\uff0c\u4e0b\u9762\u6211\u4eec\u5c06\u9488\u5bf9CVI\u521d\u5b66\u8005\u7ecf\u5e38\u9047\u5230\u7684\u51e0\u4e2a\u95ee\u9898\uff0c\u63d0\u4f9b\u89e3\u51b3\u95ee\u9898\u7684\u65b9\u6cd5\u3002<\/p>\n<h2><span id=\"nbspnbspnbsp_221_CVI\">&nbsp;&nbsp;&nbsp; 2.2.1 \u968f\u5fc3\u4f7f\u7528\u66f4\u4e30\u5bcc\u7684CVI\u63a7\u4ef6<\/span><\/h2>\n<p>CVI\u5177\u6709\u4e30\u5bcc\u7684\u63a7\u4ef6\uff0c\u4ece\u4e00\u822c\u7684\u6309\u94ae\u3001\u754c\u9762\u5230\u56fe\u8868\u3001\u5f00\u5173\u3002\u5728\u4f7f\u7528CVI\u63d0\u4f9b\u7684\u4e30\u5bcc\u3001\u5f3a\u5927\u7684\u63a7\u4ef6\u4e4b\u524d\uff0c\u6211\u4eec\u5fc5\u987b\u5148\u5bf9CVI\u63d0\u4f9b\u4e86\u54ea\u4e9b\u63a7\u4ef6\u6709\u4e00\u4e2a\u5927\u81f4\u7684\u4e86\u89e3\u3002<\/p>\n<p>CVI\u63a7\u4ef6\u7684\u7c7b\u578b\u5217\u4e3e\u5982\u8868 2\u20111\u6240\u793a\u3002<\/p>\n<p align=\"center\"><a name=\"_Ref350433893\"><\/a>\u8868 2\u20111 CVI\u7684\u63a7\u4ef6\u7c7b\u578b<\/p>\n<p align=\"center\">\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"1\">\n<tbody>\n<tr>\n<td width=\"264\">\n<p align=\"center\">\u6570\u503c\u578b\u63a7\u4ef6\uff08Numeric\uff09<\/p>\n<\/td>\n<td width=\"233\">\u6587\u672c\u578b\u63a7\u4ef6\uff08Text \uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"264\">\u547d\u4ee4\u6309\u94ae\uff08Command Button\uff09<\/td>\n<td width=\"233\">\u53cc\u6001\u6309\u94ae\uff08Toggle Button\uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"264\">\u6307\u793a\u706f\uff08LED\uff09<\/td>\n<td width=\"233\">\u4e8c\u503c\u5f00\u5173\uff08Binary Switch\uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"264\">\u5217\u8868\u63a7\u4ef6\uff08Ring\uff09<\/td>\n<td width=\"233\">\u5217\u8868\u6846\uff08List Box\uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"264\">\u88c5\u9970\u63a7\u4ef6\uff08Decoration\uff09<\/td>\n<td width=\"233\">\u56fe\u5f62\u63a7\u4ef6\uff08Graph\uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"264\">\u56fe\u7247\u63a7\u4ef6\uff08Picture\uff09<\/td>\n<td width=\"233\">\u8868\u683c\u63a7\u4ef6\uff08Table\uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"264\">\u5b9a\u65f6\u5668\u63a7\u4ef6\uff08Timer\uff09<\/td>\n<td width=\"233\">\u753b\u5e03\u63a7\u4ef6\uff08Canvas\uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"264\">\u5206\u9694\u7ebf\u63a7\u4ef6\uff08Splitter\uff09<\/td>\n<td width=\"233\">\u6807\u7b7e\u9875\u63a7\u4ef6\uff08Tab\uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"264\">ActiveX\u63a7\u4ef6\uff08ActiveX\uff09<\/td>\n<td width=\"233\">\u7ecf\u5178\u6837\u5f0f\u63a7\u4ef6\uff08Classic-Style\u2026\uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"264\">\u81ea\u5b9a\u4e49\u63a7\u4ef6\uff08Custom Controls\uff09<\/td>\n<td width=\"233\">&nbsp;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5e38\u7528\u63a7\u4ef6\u7684\u529f\u80fd\u5982\u4e0b\uff1a<\/p>\n<p>\uff081\uff09 \u6570\u503c\u578b\uff08Numeric\uff09\u63a7\u4ef6\u53ef\u4f5c\u4e3a\u7528\u6237\u53c2\u6570\u8f93\u5165\u7a97\u6216\u7a0b\u5e8f\u53c2\u6570\u56de\u663e\u7a97\uff1b<\/p>\n<p>\uff082\uff09 \u5b57\u7b26\u4e32\uff08Text \uff09\u63a7\u4ef6\u7528\u6765\u8f93\u5165\u6216\u663e\u793a\u4e00\u4e2a\u5b57\u7b26\u4e32\uff1b<\/p>\n<p>\uff083\uff09 \u6587\u672c\u578b\u63a7\u4ef6\u5305\u62ec\u6587\u672c\u6846\u63a7\u4ef6\uff08Text Box Control\uff09\u548c\u4fe1\u606f\u6846\u63a7\u4ef6\uff08Text Message Control\uff09\uff0c\u7528\u4e8e\u663e\u793a\u5927\u91cf\u7684\u6587\u672c\u4fe1\u606f\uff1b<\/p>\n<p>\uff084\uff09 \u547d\u4ee4\u6309\u94ae\uff08Command Button\uff09\u63a7\u4ef6\u7528\u4e8e\u51fa\u53d1\u4e00\u4e2a\u4e8b\u4ef6\uff0c\u7528\u4e8e\u4eea\u5668\u7684\u63a7\u5236\u3002\u547d\u4ee4\u6309\u94ae\u4e00\u822c\u5fc5\u987b\u5b9a\u4e49\u56de\u8c03\u51fd\u6570\u529f\u80fd\u7684\u540d\u79f0\uff1b<\/p>\n<p>\uff085\uff09 \u53cc\u6001\u6309\u94ae\uff08Toggle Button\uff09\u63a7\u4ef6\u5305\u62ec\u53cc\u6001\u6309\u94ae\u3001\u6587\u672c\/\u56fe\u5f62\u53cc\u6001\u6309\u94ae\u548c\u5355\u9009\/\u590d\u9009\u6309\u94ae\uff0c\u5b83\u4eec\u90fd\u6709\u4e24\u79cd\u72b6\u6001\uff0c\u5206\u522b\u4e3a\u201c0\u201d\u548c\u201c1\u201d\u3002<\/p>\n<p>\uff086\uff09 \u4e8c\u503c\u5f00\u5173\uff08Binary Switch\uff09\u63a7\u4ef6\u53ef\u4ee5\u5728\u4e24\u79cd\u72b6\u6001\uff08On\/Off\uff09\u4e0b\u5de5\u4f5c\uff0c\u5e76\u4e3a\u4e24\u79cd\u72b6\u6001\u8bbe\u7f6e\u63a7\u4ef6\u503c\u548c\u6807\u9898\uff0c\u4e0e\u89e6\u53d1\u6309\u94ae\u7c7b\u4f3c\uff1b<\/p>\n<p>\uff087\uff09 \u5217\u8868\uff08Ring\uff09\u63a7\u4ef6\u7528\u4e8e\u5728\u4e00\u7ec4\u503c\u4e2d\u8fdb\u884c\u9009\u62e9\uff0c\u65e2\u53ef\u4ee5\u7528\u9f20\u6807\u5355\u51fb\u63a7\u4ef6\u6846\u6216\u5355\u51fb\u63a7\u4ef6\u7684\u4e0a\u4e0b\u7bad\u5934\u9009\u62e9\uff0c\u4e5f\u53ef\u4ee5\u7528\u952e\u76d8\u7684Up\u548cDown\u952e\u6765\u9009\u62e9\uff1b<\/p>\n<p>\uff088\uff09 \u65f6\u949f\uff08Timer\uff09\u63a7\u4ef6\u7528\u6765\u8bbe\u7f6e\u7279\u5b9a\u7684\u65f6\u95f4\u6bb5\u5185\u89e6\u53d1\u4e8b\u4ef6\uff0c\u5b83\u53ef\u4ee5\u5728\u65e0\u9650\u957f\u7684\u65f6\u95f4\u91cc\u7b49\u95f4\u9694\u5730\u91cd\u590d\u6267\u884c\u7ed9\u5b9a\u7684\u64cd\u4f5c\uff1b<\/p>\n<p>\uff089\uff09 \u56fe\u5f62\uff08Graph\uff09\u63a7\u4ef6\u5206\u4e3a\u66f2\u7ebf\u56feGraph\u63a7\u4ef6\u548c\u5e26\u72b6\u56feStrip Charts\u63a7\u4ef6\u3002\u5e26\u72b6\u56fe\u7528\u6765\u5b9e\u65f6\u663e\u793a\u56fe\u5f62\u6570\u636e\u3002<\/p>\n<p>\uff0810\uff09\u6807\u7b7e\u9875\uff08Tab\uff09\u63a7\u4ef6\u7528\u6765\u7ed9\u7a0b\u5e8f\u6dfb\u52a0\u591a\u4e2a\u53ef\u4ee5\u5207\u6362\u7684\u6807\u7b7e\u9875\u3002<\/p>\n<p>\uff0811\uff09\u7ecf\u5178\u6837\u5f0f\u63a7\u4ef6\uff08Classic-Style\u2026\uff09\u7f57\u5217\u4e86\u65e9\u671f\u7248\u672c\u4e2dCVI\u7684\u63a7\u4ef6\u3002<\/p>\n<p>\u5728.uir\u6587\u4ef6\u4e2d\u6dfb\u52a0\u63a7\u4ef6\u4e4b\u540e\uff0c\u53f3\u51fb\u63a7\u4ef6\uff0c\u90fd\u4f1a\u5f39\u51fa\u7c7b\u4f3c\u56fe 2\u20119\u6240\u793a\u7684\u83dc\u5355\uff1a<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/21.jpg\"><img loading=\"lazy\" title=\"21\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"21\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/21_thumb.jpg\" width=\"251\" height=\"119\"><\/a><\/p>\n<p align=\"center\"><a name=\"_Ref350620795\"><\/a><span style=\"font-size: small\">\u56fe<\/span> <span style=\"font-size: small\">2\u20119 \u53f3\u51fb\u63a7\u4ef6\u5f39\u51fa\u83dc\u5355<\/span><\/p>\n<p>\u9009\u62e9\u201cControl Help\u201d\uff0c\u5219CVI\u4f1a\u81ea\u52a8\u6253\u5f00\u5e2e\u52a9\u6587\u6863\u7684\u8be5\u63a7\u4ef6\u7684\u5e2e\u52a9\u90e8\u5206\u3002\u5982\u56fe 2\u201110\u6240\u793a\u3002\u70b9\u51fbProgramming\u2026 Controls \u94fe\u63a5\u5373\u53ef\u67e5\u770b\u64cd\u4f5c\u8be5\u63a7\u4ef6\u6240\u9700\u8981\u7684\u4e00\u4e9b\u51fd\u6570\u3002<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/22.jpg\"><img loading=\"lazy\" title=\"22\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"22\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/22_thumb.jpg\" width=\"334\" height=\"272\"><\/a><\/p>\n<p align=\"center\"><a name=\"_Ref350620926\"><\/a><span style=\"font-size: small\">\u56fe<\/span> <span style=\"font-size: small\">2\u201110 \u63a7\u4ef6\u7684\u5e2e\u52a9\u6587\u6863<\/span><\/p>\n<h2><span id=\"nbspnbspnbsp_222_CVI\">&nbsp;&nbsp;&nbsp; 2.2.2 \u4f7f\u7528\u4e30\u5bcc\u7684CVI\u51fd\u6570\u5e93<\/span><\/h2>\n<p>\u5728\u7b2c\u4e00\u7ae0\u4e2d\uff0c\u6211\u4eec\u63d0\u5230\u4e86CVI\u7684\u5f3a\u5927\u4e4b\u5904\u5728\u4e8e\u5b83\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u51fd\u6570\u5e93\u652f\u6301\u3002\u5229\u7528CVI\u7684\u5e93\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u7684\u5b9e\u73b0\u6570\u636e\u91c7\u96c6\u3001\u6570\u636e\u5206\u6790\u3001GUI\u4ea4\u4e92\u3001\u901a\u4fe1\u4ee5\u53ca\u591a\u7ebf\u7a0b\u7b49\u529f\u80fd\u3002<\/p>\n<p>\u5982\u4f55\u4f7f\u7528CVI\u4e30\u5bcc\u7684\u51fd\u6570\u5e93\u5462\uff1f\u7ec6\u5fc3\u7684\u540c\u5b66\u53ef\u80fd\u5df2\u7ecf\u6ce8\u610f\u5230\u4e86\uff0c\u5728CVI\u5f00\u53d1\u73af\u5883\u7684\u5de6\u4e0b\u89d2\u6709\u4e00\u4e2aLibraries Tree\u7a97\u53e3\uff08\u5982\u56fe 2\u201111\uff09\uff0c\u63d0\u4f9b\u4e86CVI\u63d0\u4f9b\u7684\u51fd\u6570\u5e93\uff08fp\uff0cFunction Tree\uff09\u7684\u6d4f\u89c8\u529f\u80fd\u3002<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/23.jpg\"><img loading=\"lazy\" title=\"23\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"23\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/23_thumb.jpg\" width=\"247\" height=\"316\"><\/a><\/p>\n<p align=\"center\"><a name=\"_Ref350621486\"><\/a><span style=\"font-size: small\">\u56fe<\/span> <span style=\"font-size: small\">2\u201111 CVI\u63d0\u4f9b\u7684\u51fd\u6570\u5e93\u7a97\u53e3<\/span><\/p>\n<p>\u4f8b\u5982\uff0c\u82e5\u60f3\u5b9e\u73b0\u4ee5\u4e0b\u5f39\u7a97\uff08Popup\uff09\u7684\u529f\u80fd\u3002\u5219\u53ef\u5728\u51fd\u6570\u5e93\u6d4f\u89c8\u7a97\u53e3\u7684User Interface Library\u4e2d\u6253\u5f00Pop-up Panels\uff0c\u7136\u540e\u5728 Message\/Prompt Popups\u4e2d\u627e\u5230ConfirmPopup\u51fd\u6570\uff0c\u53f3\u51fb\u8be5\u51fd\u6570\uff0c\u9009\u62e9Function Help\uff0c\u5373\u53ef\u83b7\u5f97\u4f7f\u7528\u8be5\u51fd\u6570\u7684\u76f8\u5173\u5e2e\u52a9\u3002\u5982\u679c\u76f4\u63a5\u53cc\u51fb\u8be5\u51fd\u6570\uff0c\u8fd8\u4f1a\u5728\u53f3\u4fa7\u51fa\u73b0\u51fd\u6570\u9762\u677f\uff0c\u8f85\u52a9\u5927\u5bb6\u586b\u5199\u51fd\u6570\u7684\u53c2\u6570\u3002<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/24.jpg\"><img loading=\"lazy\" title=\"24\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"24\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/24_thumb.jpg\" width=\"183\" height=\"123\"><\/a><\/p>\n<p align=\"center\"><span style=\"font-size: small\">\u56fe 2\u201112 \u786e\u8ba4\u662f\u5426\u5173\u95ed\u7684\u5f39\u7a97<\/span><\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/25.jpg\"><img loading=\"lazy\" title=\"25\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"25\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/25_thumb.jpg\" width=\"271\" height=\"287\"><\/a><\/p>\n<p align=\"center\"><span style=\"font-size: small\">\u56fe 2\u201113 \u83b7\u5f97\u51fd\u6570\u7684\u5e2e\u52a9\u4fe1\u606f<\/span><\/p>\n<p>\u4e00\u4e2a\u5178\u578b\u7684\u5e2e\u52a9\u7a97\u53e3\u5982\u6240\u793a\u3002\u5e2e\u52a9\u7a97\u53e3\u4e2d\u4e00\u822c\u5177\u6709\u8be5\u51fd\u6570\u529f\u80fd\u7684\u7b80\u5355\u63cf\u8ff0\uff0c\u5e76\u4e14\u5177\u6709\u8be5\u51fd\u6570\u7684\u58f0\u660e\u3002<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/26.jpg\"><img loading=\"lazy\" title=\"26\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"26\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/26_thumb.jpg\" width=\"445\" height=\"256\"><\/a><\/p>\n<p align=\"center\"><span style=\"font-size: small\">\u56fe 2\u201114 ConfirmPopup\u7684\u5e2e\u52a9\u7a97\u53e3<\/span><\/p>\n<p>\u4f7f\u7528\u8be5\u5e2e\u52a9\u7a97\u53e3\u8db3\u591f\u6ee1\u8db3\u4e00\u822c\u60c5\u51b5\u7684\u9700\u6c42\u3002\u4f46\u82e5\u60f3\u8981\u5bfb\u6c42\u66f4\u52a0\u8be6\u7ec6\u5e2e\u52a9\u6587\u6863\uff0c\u53ef\u4ee5\u70b9\u51fb\u83dc\u5355<u>H<\/u>elp-<u>C<\/u>ontents\uff0c\u5728\u201c\u7d22\u5f15\u201d\u4e2d\u8f93\u5165\u51fd\u6570\u540d\uff0c\u5bfb\u6c42\u66f4\u52a0\u8be6\u7ec6\u7684\u8bf4\u660e\u6587\u6863\u3002<\/p>\n<p>\u6b64\u5916CVI\u8fd8\u63d0\u4f9b\u4e86\u5176\u4ed6\u4e30\u5bcc\u7684\u51fd\u6570\u5e93\u3002CVI\u7684\u51fd\u6570\u5e93\u4e0d\u5149\u53ef\u4ee5\u5b9e\u73b0\u7528\u6237\u4ea4\u4e92\u7684\u64cd\u4f5c\uff0c\u652f\u6301ANSI C\uff0c\u8fd8\u652f\u6301\u4ee5\u4e0b\u8bf8\u591a\u529f\u80fd\uff1a<\/p>\n<p>\u83dc\u5355\u521b\u5efa\u3001\u6253\u5370\u7ba1\u7406\u3001\u7ed8\u56fe\u3001\u526a\u5207\u677f\u64cd\u4f5c\u3001\u6700\u5c0f\u5316\u5230\u7cfb\u7edf\u6258\u76d8\u3001\u9f20\u6807\u63a7\u5236\u3001\u6309\u952e\u68c0\u6d4b\u3001\u5b9a\u65f6\u5668\u3001\u663e\u793a\u5668\u517c\u5bb9\u7ba1\u7406\u3001\u4fe1\u53f7\u751f\u6210\u3001\u77e9\u9635\u64cd\u4f5c\u3001\u590d\u6570\u8fd0\u7b97\u3001\u4fe1\u53f7\u5904\u7406\u3001\u4fe1\u53f7\u6d4b\u91cf\u3001\u6570\u636e\u7edf\u8ba1\u3001\u62df\u5408\u3001\u5411\u91cf\u8fd0\u7b97\u3001\u5b57\u7b26\u4e32\u64cd\u4f5c\u3001\u6587\u4ef6\u64cd\u4f5c\u3001\u7269\u7406\u5185\u5b58\u8bbf\u95ee\u3001\u4efb\u52a1\u7ba1\u7406\u3001\u8c03\u7528\u5916\u90e8\u7a0b\u5e8f\u3001\u591a\u7ebf\u7a0b\u7ba1\u7406\u3001\u8c03\u7528\u5916\u90e8\u6a21\u5757\u7ba1\u7406\u3001VXI\u901a\u4fe1\u3001GPIB\u901a\u4fe1\u3001RS232\u901a\u4fe1\u3001VISA\u529f\u80fd\u3001TCP\u901a\u4fe1\u3001\u8bbf\u95eeInternet\u3001\u76f4\u63a5\u6570\u636e\u8bbf\u95ee\u63a7\u5236\u3001\u8c03\u7528ActiveX\u63a7\u4ef6\u3001\u8c03\u7528.Net\u529f\u80fd\u3001\u5957\u63a5\u5b57\u901a\u4fe1\u7b49\u7b49\u7b49\u7b49\u3002<\/p>\n<h2><span id=\"nbspnbspnbsp_223_CVI\">&nbsp;&nbsp;&nbsp; 2.2.3 \u83b7\u53d6\u4e30\u5bcc\u7684CVI\u4e8b\u4ef6\u4e0e\u7528\u6237\u4ea4\u4e92<\/span><\/h2>\n<p>CVI\u5e94\u7528\u7a0b\u5e8f\u662f\u4ee5\u4e8b\u4ef6\u6765\u9a71\u52a8\u7684\uff08\u4e8b\u4ef6\u9a71\u52a8\u662f\u6307\u5f53\u4e8b\u4ef6\u53d1\u751f\u540e\u5bf9\u5e94\u7684\u4ee3\u7801\u624d\u4f1a\u88ab\u6267\u884c\uff09\u3002CVI\u4e2d\u7684\u4e8b\u4ef6\u6709\u4e09\u79cd\u6765\u6e90\uff1a\u7528\u6237\u64cd\u4f5c\u5f15\u8d77\u7684\u4e8b\u4ef6\uff08\u5982\u9f20\u6807\u70b9\u51fb\uff09\u3001\u64cd\u4f5c\u7cfb\u7edf\u53d1\u9001\u7684\u4e8b\u4ef6\uff08\u5982\u5b9a\u65f6\u5668\uff09\u3001\u5e94\u7528\u7a0b\u5e8f\u4e4b\u95f4\u53d1\u9001\u7684\u6216\u81ea\u5df1\u7ed9\u81ea\u5df1\u53d1\u9001\u7684\u4e8b\u4ef6\u3002<\/p>\n<p>\u57282.1.5 \u6dfb\u52a0\u56de\u8c03\u51fd\u6570\u4e2d\uff0c\u6211\u4eec\u5df2\u7ecf\u521d\u6b65\u63a5\u89e6\u4e86\u63a7\u4ef6\u4ee5\u53ca\u9762\u677f\u7684\u4e8b\u4ef6\u3002\u901a\u8fc7userint.h\u4e2d\u5bf9\u4e8b\u4ef6\u7684\u5b8f\u5b9a\u4e49\u6211\u4eec\u53ef\u4ee5\u77e5\u9053CVI\u4e2d\u6709\u54ea\u4e9b\u4e8b\u4ef6\uff0c\u4f46\u662f\u6211\u4eec\u5374\u65e0\u6cd5\u77e5\u9053\u9762\u677f\u6b64\u65f6\u6b63\u5728\u53d1\u751f\u7684\u4e8b\u4ef6\u662f\u4ec0\u4e48\u3002<\/p>\n<p>\u7528\u6237\u754c\u9762\u6587\u4ef6\u7f16\u8f91\u5668\u5c31\u63d0\u4f9b\u4e86\u65b9\u4fbf\u6211\u4eec\u67e5\u770b\u9762\u677f\u5f53\u524d\u53d1\u751f\u7684\u4e8b\u4ef6\u7684\u67e5\u770b\u5668\u3002\u5f53\u6211\u4eec\u6253\u5f00\u4e00\u4e2a.uir\u6587\u4ef6\u65f6\uff0c\u5728\u7528\u6237\u754c\u9762\u6587\u4ef6\u7f16\u8f91\u5668\u7684\u4e0a\u65b9\u6709\u56db\u4e2a\u72b6\u6001\u5207\u6362\u6309\u94ae\uff08\u5982\u6240\u793a\uff09\u3002\u4ece\u5de6\u5230\u53f3\u5206\u522b\u662f\u9884\u89c8\u6309\u94ae\u3001\u754c\u9762\u7f16\u8f91\u6309\u94ae\u5b57\u4f53\u7f16\u8f91\u6309\u94ae\u4e0e\u80cc\u666f\u7f16\u8f91\u6309\u94ae\u3002<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/27.jpg\"><img loading=\"lazy\" title=\"27\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"27\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/27_thumb.jpg\" width=\"111\" height=\"35\"><\/a><\/p>\n<p align=\"center\"><span style=\"font-size: small\">\u56fe 2\u201115 uir\u6587\u4ef6\u7684\u72b6\u6001\u5207\u6362\u6309\u94ae<\/span><\/p>\n<p>\u70b9\u51fb\u9884\u89c8\u6309\u94ae\uff0c\u5c06\u72b6\u6001\u5207\u6362\u5230\u9884\u89c8\u3002\u6b64\u65f6\uff0c\u5c1d\u8bd5\u9f20\u6807\u6216\u8005\u952e\u76d8\u64cd\u4f5c\uff0c\u5728CVI\u7684\u53f3\u4e0a\u89d2\uff08\u4e0d\u540c\u7248\u672c\u53ef\u80fd\u6709\u6240\u533a\u522b\uff09\u4f1a\u51fa\u73b0\u4ee5\u201cEVENT_\u201d\u5f00\u5934\u7684\u5b57\u6837\uff0c\u8be5\u5b57\u6837\u5373\u63d0\u793a\u4e86\u5f53\u524d\u53d1\u751f\u7684\u4e8b\u4ef6\u3002<\/p>\n<p>\u5f53\u77e5\u9053\u4e86\u67d0\u79cd\u64cd\u4f5c\u5bfc\u81f4\u7684\u4e8b\u4ef6\u4e4b\u540e\uff0c\u53ef\u4ee5\u518d\u6b21\u5207\u6362\u5230\u754c\u9762\u7f16\u8f91\u6a21\u5f0f\uff0c\u53f3\u51fb\u8be5\u63a7\u4ef6-View Control Callback\u5219CVI\u4f1a\u81ea\u52a8\u8df3\u5230\u8be5\u63a7\u4ef6\u7684\u56de\u8c03\u51fd\u6570\u4e2d\u3002\u82e5View Control Callback\u4e0d\u53ef\u7528\uff0c\u5219\u53cc\u51fb\u8be5\u63a7\u4ef6\uff0c\u7ed9\u8be5\u63a7\u4ef6\u6dfb\u52a0\u56de\u8c03\u51fd\u6570\uff08Callback <u>F<\/u>unction\uff09\u7136\u540e\u53f3\u51fb\u63a7\u4ef6-Generate Control Callback\u540e\u5373\u53ef\u4f7f\u7528\u3002<\/p>\n<h1><span id=\"23\"><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1\">2.3 \u63a2\u7d22\u4e0e\u5b9e\u9a8c<\/span><\/span><\/h1>\n<h2><span id=\"nbsp_231\">&nbsp; 2.3.1 \u5b9e\u9a8c<\/span><\/h2>\n<p>\u8bbe\u8ba1\u865a\u62df\u4fe1\u53f7\u53d1\u751f\u5668\uff0c\u5982\u56fe 2\u201116\u6240\u793a\u3002<\/p>\n<p align=\"center\"><a href=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/28.jpg\"><img loading=\"lazy\" title=\"28\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"28\" src=\"http:\/\/img.liuwenhao.ink\/img\/LabWindowsCVIGUI_12EC\/28_thumb.jpg\" width=\"549\" height=\"385\"><\/a><\/p>\n<p align=\"center\"><a name=\"_Ref350349171\"><\/a><span style=\"font-size: small\">\u56fe<\/span> <span style=\"font-size: small\">2\u201116 \u865a\u62df\u4fe1\u53f7\u53d1\u751f\u5668<\/span><\/p>\n<p>\u529f\u80fd\u63cf\u8ff0\u53ca\u6d4b\u8bd5\u8868\u683c\u5982\u8868 2\u20112\u6240\u793a\u3002<\/p>\n<p align=\"center\"><a name=\"_Ref350349293\"><\/a><a name=\"_Ref350349296\"><\/a>\u8868 2\u20112 \u865a\u62df\u4fe1\u53f7\u53d1\u751f\u5668\u6d4b\u8bd5\u8868\u683c<\/p>\n<p align=\"center\">\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"1\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"158\"><b>\u529f\u80fd\u8981\u6c42<\/b><\/td>\n<td valign=\"top\" width=\"368\"><b>\u6d4b\u8bd5\u8981\u6c42<\/b><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\">\u6ce2\u5f62\u9009\u62e9<\/td>\n<td valign=\"top\" width=\"368\">\u5728\u4e09\u89d2\u6ce2\u3001\u6b63\u5f26\u6ce2\u3001\u65b9\u6ce2\u3001\u4efb\u610f\u6ce2\u4e4b\u95f4\u5207\u6362<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\">\u6ce2\u5f62\u53c2\u6570\u8bbe\u7f6e<\/td>\n<td valign=\"top\" width=\"368\">\u8bbe\u7f6e\u91c7\u6837\u7387\u3001\u9891\u7387\u3001\u5e45\u503c<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\">\u504f\u79fb\u91cf\u8bbe\u7f6e<\/td>\n<td valign=\"top\" width=\"368\">\u8bbe\u7f6e\u6ce2\u5f62\u7684\u504f\u79fb\u91cf<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\">\u663e\u793a\u989c\u8272\u8bbe\u7f6e<\/td>\n<td valign=\"top\" width=\"368\">\u8bbe\u7f6e\u6ce2\u5f62\u663e\u793a\u7684\u989c\u8272<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span id=\"nbsp_232\">&nbsp; 2.3.2 \u63a2\u7a76<\/span><\/h2>\n<p>\u63a2\u7a76\u5728CVI\u4e0b\u83dc\u5355\u521b\u5efa\u3001\u6253\u5370\u7ba1\u7406\u3001\u7ed8\u56fe\u3001\u526a\u5207\u677f\u64cd\u4f5c\u3001\u6700\u5c0f\u5316\u5230\u7cfb\u7edf\u6258\u76d8\u3001\u9f20\u6807\u63a7\u5236\u3001\u6309\u952e\u68c0\u6d4b\u3001\u5b9a\u65f6\u5668\u3001\u663e\u793a\u5668\u517c\u5bb9\u7ba1\u7406\u3001\u4fe1\u53f7\u751f\u6210\u3001\u77e9\u9635\u64cd\u4f5c\u3001\u590d\u6570\u8fd0\u7b97\u3001\u4fe1\u53f7\u5904\u7406\u3001\u4fe1\u53f7\u6d4b\u91cf\u3001\u6570\u636e\u7edf\u8ba1\u3001\u62df\u5408\u3001\u5411\u91cf\u8fd0\u7b97\u3001\u5b57\u7b26\u4e32\u64cd\u4f5c\u3001\u7269\u7406\u5185\u5b58\u8bbf\u95ee\u3001\u4efb\u52a1\u7ba1\u7406\u3001\u8c03\u7528\u5916\u90e8\u7a0b\u5e8f\u3001\u591a\u7ebf\u7a0b\u7ba1\u7406\u3001\u8c03\u7528\u5916\u90e8\u6a21\u5757\u7ba1\u7406\u7b49\u51fd\u6570\u5e93\u7684\u51fd\u6570\u3002<\/p>\n<p>\u81ea\u5df1\u5199iRunUserInterface\u51fd\u6570\uff0c\u8981\u6c42\u5b9e\u73b0\u8ddfRunUserInterface\u51fd\u6570\u5b8c\u5168\u76f8\u540c\u7684\u529f\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2.1 \u516d\u6b65\u6784\u5efa\u7b80\u5355\u7684GUI\u7a0b\u5e8f \u5728\u672c\u8282\u4e2d\uff0c\u6211\u4eec\u8981\u505a\u7684\u4f8b\u5b50\u5f88\u7b80\u5355\uff0c\u662f\u521b\u5efa\u4e00\u4e2a\u5982\u4e0b\u56fe\u6240\u793a\u7684\u5e94\u7528\u7a0b\u5e8f\u3002 \u56fe 2\u20111 \u7a0b\u5e8f\u8fd0\u884c\u6548\u679c &nbsp; 2.1.1 \u521b\u5efa\u5de5\u7a0b\u6587\u4ef6 \u8fd0\u884cLabWindows\/CVI\uff0c\u5355\u51fb\u83dc\u5355File-New-Project(*.prj)\u2026\uff0c\u5c06\u4f1a\u51fa\u73b0\u65b0\u5efa\u5de5\u7a0b\u7684\u9009\u9879\u5bf9\u8bdd\u6846\u3002\u5728\u5bf9\u8bdd\u6846\u4e2d\u53ef&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":-613,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[21],"views":3025,"_links":{"self":[{"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=\/wp\/v2\/posts\/613"}],"collection":[{"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=613"}],"version-history":[{"count":3,"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=\/wp\/v2\/posts\/613\/revisions"}],"predecessor-version":[{"id":5346,"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=\/wp\/v2\/posts\/613\/revisions\/5346"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=\/"}],"wp:attachment":[{"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}