函式原型:int messagepopup (char title, char message);
title:對話方塊標題(例:this is a message popup)
message:對話方塊資訊(例:message text goes here)
返回值:負代表錯誤
返回值:1:yes 0:no 負:error
3、prompt pop-up panel 提示框
函式原型:
int promptpopup (char title, char message, char responsebuffer, size_t maxresponselength);
responsebuffer:輸入的字串
maxresponselength:字串最大長度
可以實現以上三者的功能
可以包含最多三個按鈕和乙個訊息框
函式原型:int genericmessagepopup (char title, char message, char buttonlabel1, char buttonlabel2, char buttonlabel3, char responsebuffer, size_t maxresponselength, int buttonalignment, int activecontrol, int enterbutton, int escapebutton);
buttonlabel1/2/3:按鈕的標題
buttonalignment:按鈕位置,非零:右側 0:底部
activecontrol:當前啟用的按鈕/輸入框
enterbutton:繫結其中乙個按鈕到enter鍵
escapebutton:繫結乙個按鈕到esc
返回值:返回值為當前選擇的按鈕號
函式原型:int fileselectpopup (char defaultdirectory, char defaultfilespec, char filetypelist, char title, int buttonlabel, int restrictdirectory, int restrictextension, int allowcancel, int allowmakedirectory, char pathname);
defaultdirectory:初始路徑 如果為空「」 使用當前目錄
defaultfilespec :初始檔案字尾,例子「*.c」
filetypelist:檔案型別列表,顯示特定字尾的檔案, 用分號可輸入多個。 只有restrictextension is false才可以。例子, "*.c; *.h" 「 *.*」 :顯示所有檔案
restrictdirectory:限定資料夾
restrictextension:限定副檔名
allowcancel:設定返回鍵
allowmakedirectory:設定新建資料夾按鍵
pathname:選定的檔案(輸出)
返回值:是否選中
0val_no_file_selected
1val_existing_file_selected
2val_new_file_selected
函式原型:
int xgraphpopup (char title, void *xarray, size_t numberofpoints, int xdatatype);
返回值:顯示是否繪製成功,負數error
xarray
void *
需要描的點.
numberofpoints
size_t
需要描的點數
xdatatype
int
the data type of the x array. the following table lists the valid data types.
val_char
a single byte character.
val_short_integer
a 2 byte integer.
val_integer
a 4 byte integer.
val_float
a 4 byte floating point value.
val_double
an 8 byte floating point value.
val_64bit_integer
an 8 byte integer.
val_unsigned_short_integer
an unsigned 2 byte integer.
val_unsigned_integer
an unsigned 4 byte integer.
val_unsigned_char
an unsigned single byte character.
val_unsigned_64bit_integer
an unsigned 8 byte integer.
val_size_t
val_ssize_t
val_ptrdiff_t
val_uintptr_t
val_intptr_t
LabwindowsCVI 串列埠程式設計及事例
串列埠是一種常見的通訊匯流排技術,其支援全雙工模式,且只支援一對一的訪問模式,大部分裝置都支援串列埠通訊,可通過串列埠控制裝置或採集資料。下面將介紹labwindowscvi對串列埠的支援。opencomconfig opencomconfig用於開啟並配置com裝置,其函式原型如下所示 int o...
LabWindows CVI第一章 基本規則
一 include 標頭檔案,號是預處理指令,standard input output header的縮寫。void main 主函式 printf hello n print format的縮寫,前加tab鍵空出4個格。return 0 n 換行,t 空字元,f 實數,一般保留六位有效數字,2f...
模態對話方塊 非模態對話方塊 標準對話方塊 檔案對話方塊
模態對話方塊 qdialog 非模態對話方塊 qdialog 標準對話方塊 關於對話方塊 問題對話方塊等 qmessagebox 檔案對話方塊 qfiledialog 標準對話方塊還有 qcolordialog 選擇顏色 qfiledialog 選擇檔案或者目錄 qfontdialog 選擇字型 q...