Microsoft PowerPoint - gp2.ppt

Size: px
Start display at page:

Download "Microsoft PowerPoint - gp2.ppt"

Transcription

1 Windows 視窗程式設計 (1) 靜宜大學資訊管理學系蔡奇偉副教授 大綱 Windows 視窗系統的特性 Windows API MSDN 線上說明文件 匈牙利 (Hungarian) 命名法 一個最少行的 Windows 視窗程式 Windows 程式的事件處理模型 視窗程式的骨架 1

2 Windows 視窗系統的特性 圖形化的人機介面 圖形顯示器 視窗 滑鼠 + 鍵盤 Multiprocessing & Multithreading 可同時處理多個程式 一個程式可有多個執行緒 (thread) 事件驅動模式 程式的執行是依據事件而定 Windows API Windows API (Application Program Interface) 是一套微軟公司所提供的函式庫, 專門用來撰寫 Windows 的應用程式 裏面有上千個函式 它們的功能包括 : 繪圖 列印 記憶體管理 網路連接 輸出 / 入裝置的讀寫 檔案的讀寫 建立選單 程式資源管理 等等, 應有盡有 要完全熟悉它們, 可得花上一段長久的歲月 幸好, 寫 Windows 的遊戲程式時, 我們只要知道少部分 的 Windows API 即可 2

3 MSDN 線上說明文件 MSDN (Microsoft Developer Network) 是微軟公司提供給程式發展者的一套鉅大資料庫, 裏面涵括所有微軟産品的技術文件 說明手冊 API 定義 一些微軟的書籍 以及發展中的程式庫 你可以到 MSDN 網站 ( 直接閱覽或下載這些資料, 也可以安裝 MSDN 光碟片, 在你的電腦上更快速地瀏覽 任何一位 Windows 視窗程式的設計者, 都應該善用 MSDN 裏豐富的資訊, 一方面增強自已的實力, 一方面也可避免無謂的錯誤 3

4 匈牙利命名法 匈牙利命名法 (Hungarian Notations) 是微軟公司的 Charles Simonyi 先生所提出的一套變數命名的法則 : 把型態的簡稱加在變數名稱之前 比方說 : 假定 value 是一個整數變數, 則取名成 ivalue name 是一個字串變數, 則取名成 strname 等等 微軟公司認為這套準則有益於大型軟體計畫的維護, 所以在其 Windows API 中都採用這套命名法 學習 Windows 程式設計的你, 應該早一點熟悉它 下一頁我們列出常用的型態字首 字首 代表的型態 範例 c char ccode by BYTE (unsigned char) byheader n int ncount i int inumber x, y short ( 存座標值 ) xcoord cx, cy short( 存座標計數值 ) cxoffset b BOOL(int 代表布林值 ) bflag w UINT(unsigned int) wpara l LONG(long) lamount dw DWORD(unsigned long) dwflags 4

5 字首 代表的型態 範例 fn function fnsort s string sname sz, str C 字串 ( 最後字元為 \0 ) szname lp 32-bit long pointer lpproc h handle hinstance msg message msginfo 註 : 上述非 C 的標準資料型態者 ( 如 BOOL ), 是微軟公司所自定的 舉例來說,BOOL 在 windows.h 中被定義成 : typedef int BOOL; 一個最少行的 Windows 視窗程式 底下是一個號稱最少行的 Windows 視窗程式 : #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <windowsx.h> // main entry point for all windows program int WINAPI WinMain (HINSTANCE hinstance, HINSTANCE hprevinstance, LPSTR lpcmdline, int ncmdshow) // call message box API MessageBox(NULL, "What's up, world!", "My first Windows Program", MB_OK); // exit program return 0; 5

6 執行前一頁的程式, 我們可以看到下面的對話視窗 : 你可以在螢幕上任意移動它的位置 按下 確定 按鈕後, 即可關閉視窗並結束程式的執行 底下我們逐行地剖析前述的程式 不過, 我們先從第 2 行說起 #include <windows.h> 所有的 Windows 視窗程式都必須加入 windows.h 這個系統標頭檔, 因為其中宣告了使用 Winsows API 所需的常數 資料型態 函式原型等等 回到第一行 : #define WIN32_LEAN_AND_MEAN 加入這巨集定義的目的是為了把 windows.h 瘦身, 排除掉一些不常用的宣告, 如此一來, 可以加速編譯的過程, 節省一些程式發展的時間 6

7 第三行 : #include <windowsx.h> windowsx.h 這個系統標頭檔定義了一些好用的巨集, 可以簡化程式的撰寫, 所以我們把它加進來 第四個指令 : int WINAPI WinMain (HINSTANCE hinstance, HINSTANCE hprevinstance, LPSTR lpcmdline, int ncmdshow) 所有的 Windows 視窗程式的執行進入點是 WinMain 這個函式 ( 非 Windows 視窗的程式則是以傳統的 main 函式為執行進入點 ) 由於早期的 Windows API 是用 Pascal 程式語言來撰寫, 而 Pascal 的參數傳遞順序 (calling sequence) 與 C 恰恰相反 因此, 在 C 程式中使用這些 API 函式時, 需要加上 WINAPI 這個宣告, 告訢編譯程式採用 Pascal 的參數傳遞順序 若是自已寫的 C 函式, 就不用加了 Windows 作業系統透過 WinMain 的四個參數, 傳遞一些資訊給你的程式, 這些參數的意義如下 : HINSTANCE hinstance 資料型態 HINSTANCE 是一個 32-bit 的 unsigned int 參數 hinstance 從作業系統接收一個代碼 (handle), 此代碼在作業系統代表這個目前正執行的程式 7

8 HINSTANCE hprevinstance hprevinstance 是此程式前一個開啟且正執行的代碼 Win32 系統已經不用這一個參數, 而且把它永遠設成 NULL (0) LPSTR lpcmdline LPSTR 是一個指標型態 參數 lpcmdline 是一個指到 C 字串的指標, 用來接收從作業系統傳來的指令行參數 比方說, 若下達的指令行為 : prog a n data.txt 則 lpcmdline 指到的字串值是 a n data.txt, 注意 : 程式名稱 prog 並不在這字串中 int ncmdshow ncmdshow 是此程式開啟時的視窗顯示方式 常見值如下 : SW_HIDE SW_MAXIMIZE SW_MINIMIZE SW_SHOW SW_SHOWNORMAL 隱藏視窗視窗放大至整個螢幕視窗縮至最小顯示並啟動視窗顯示正常大小的視窗並啟動 其他的可能值請參閱 MSDN 線上手冊 8

9 第五個指令 : MessageBox(NULL, "What's up, world!", "My first Windows Program", MB_OK); MessageBox 這個 Windows API 在螢幕上開啟一個訊息對話視窗 其宣告如下 : int MessageBox ( HWND hwnd, LPCTSTR lptext, LPCTSTR lpcaption, UINT utype ); // handle to owner window // text in message box // message box title // message box style 由於我們沒有建立視窗, 這個 message box 並無父視窗, 所以參數 hwnd 設定成 NULL message box 的顯示樣式和操作模式可以用參數 utype 來設定 比方說, 如果想再加上 Cancel 按鈕和顯示一個警告的圖像 (icon), 你可以改成以下呼叫方式 : MessageBox(NULL, "What's up, world!", "My first Windows Program", MB_OKCANCEL MB_ICONWARNING); utype 詳細的說明, 請參閱 MSDN 線上的手冊 9

10 用 MessageBox 來檢視變數 偵錯 Windows 程式時, 我們可以用 MessageBox 函式來檢視變數的值 比方說, 我們先寫下面的函式 : int showvalue (hwnd hwin, char *name, int ivalue) char szvalue[20]; sprintf(szvalue, %s = %d, name, ivalue); MessageBox(hwin, szvalue, Debug, MB_OK); 寫好之後, 我們就可以在程式中加入 showvalue 函式來顯示整數變數的值, 譬如 : int seeme = 1234; // 假定 main_window 是目前開啟的視窗 showvalue(main_window, seeme, seeme); 則會在螢幕上顯示出下面的視窗 : 10

11 視窗程式的事件驅動模型 視窗程式是採用事件驅動的模型, 換句話說, 程式的執行流程是根據事件發生的時間與種類而定 事件可因為使用者的操作而產生, 如滑鼠移動 按下滑鼠鍵 按下鍵盤 選擇功能表的項目 隱藏的視窗被提到幕前 等, 也可由硬體産生, 如主機板上的時脈產生器 (clock), 或由軟體 ( 作業系統或程式本身 ) 產生 作業系統中, 有一個稱之為訊息佇列 (message queue) 的資料結構, 用來儲存事件的訊息 作業系統會負責把這些訊息送到適當的視窗應用程式來處理, 如下一頁的圖片所示 WinMain () 視窗應用程式 Message Queue msg 1 msg 2 msg 3 WinMain () 視窗應用程式 使用者輸入 msg n WinMain () 視窗應用程式 11

12 每個視窗應用程式也內建一個 local message queue 來儲存所接收到的事件訊息 不過做為一個視窗應用程式設計師的我們, 並不需要了解這些內部結構, 我們只要知道如何擷取與處理這些訊息 這些工作可透過 Windows API 的函式呼叫即可 所有視窗程式的基本架構都大同小異, 長像都近似下一頁所描繪的樣子 WinMain () // code to setup windows msg 1 msg 1 // enter the event loop while (GetMessage) TranslateMessage DispatchMessage msg n WndProc (msg) switch (msg) case MOUSE_DOWN: case KEY_PRESS: case WM_PAINT: 12

13 在 WinMain 主函式中, 我們必須先設定好視窗物件, 讓視窗開始接收事件訊息, 然後進入所謂的事件迴圈 (event loop) 在事件迴圈中, 我們首先呼叫 GetMessage 來取得下一筆事件的訊息 然後呼叫 TranslateMessage 把訊息轉化成可以進一步處理的格式 最後呼叫 DispatchMessage 把訊息傳到我們寫好的 WndProc 函式來判讀與處理 WndProc 通常只是一個很大的 switch 敘述, 以訊息的種類來分派至適當的程式碼去執行 WndProc 稱為視窗的訊息處理函式 視窗程式的骨架 底下我們來探討視窗程式的基本架構 首先, 視窗的設定包括下面的步驟 : 1. 選擇適當的視窗類別 2. 註冊視窗類別 3. 建立視窗物件 4. 顯示視窗接著我們說明事件迴圈中的 GetMessage TranslateMesssage DispatchMessage 三個 API 以及常見的事件 13

14 選擇適當的視窗類別 在 WinMain 中, 你要宣告一個如下的變數 : WNDCLASSEX wndclass 然後把適當的值填入 wndclass 這個結構變數, 來選取視窗的類別 附註說明 : 另有一個叫 WNDCLASS 的資料型態, 它已被上述的 WNDCLASSEX 所取代 凡是新的 Windows API, 都用 EX 當作字尾 微軟公司建議新的視窗應用程式應該都採用新版的 Windows API typedef struct _WNDCLASSEX WNDCLASSEX 結構 UINT cbsize; 的定義 UINT style; WNDPROC lpfnwndproc; int cbclsextra; int cbwndextra; HINSTANCE hinstance; HICON hicon; HCURSOR hcursor; HBRUSH hbrbackground; LPCTSTR lpszmenuname; LPCTSTR lpszclassname; HICON hiconsm; WNDCLASSEX, *PWNDCLASSEX; 14

15 WNDCLASSEX 的欄位說明 UINT cbsize 這欄必須設成 WNDCLASSEX 結構的大小, 即等於 sizeof(wndclassex) UINT style 這欄設定視窗類別的樣式 多重的樣式可用運算子 結合起來 常用的樣式為 :CS_HREDRAW CS_VREDRAW 使得視窗改變水平和垂直大小時, 會重畫視窗的內容 若你希望視窗也處理 double click 事件的話, 可加上 CS_DBLCLKS 這項樣式 (CS: Class Style) WNDPROC lpfnwndproc 這欄是個函式指標 (function pointer), 必須設成前述之訊息處理的函式 int cbclsextra 指定在視窗類別結構後附加的記憶體大小, 這塊記憶體可用來儲存一些視窗類別額外的資訊 通常此欄是設成 0 (cb: count byte) int cbwndextra 指定在視窗物件結構後附加的記憶體大小, 這塊記憶體可用來儲存視窗物件額外的資訊 通常此欄是設成 0 15

16 HINSTANCE hinstance 這欄設成視窗物件的 handle, 且此視窗必須包含之前 lpfnwndproc 所指定訊息處理函式 HICON hicon 指定視窗類別的 icon handle 此欄必須設成 icon 的 resource 若設成 NULL 的話, 系統會自動選用一個預設的 icon HCURSOR hcursor 指定視窗類別的 cursor handle 此欄必須設成 cursor 的 resource 若設成 NULL 的話, 當游標移入視窗時, 你的程式必須自行設定游標的形狀 HBRUSH hbrbackground; 指定背景筆刷 (background brush) 的 handle 此筆刷用來塗抹視窗的背景圖案或顏色 LPCTSTR lpszmenuname 設為一個 C 型態的字串, 此字串是視窗類別的 menu resource 名稱 若視窗類別沒用到 menu 的話, 可以把此欄設成 NULL LPCTSTR lpszclassname 設為一個 C 型態的字串, 此字串指定視窗類別的名稱 16

17 HICON hiconsm 指定 small icon 的 handle 若設成 NULL 的話, 系統會用之前 hicon 指定的 icon 來產生 small icon 以下是 wndclass 變數的一個設定範例 : int WINAPI WinMain (HINSTANCE hinstance, HINSTANCE hprevinstance, PSTR szcmdline, int icmdshow) char szappname[] = "HelloWin"; WNDCLASSEX wndclass; wndclass.cbsize = sizeof(wndclassex); wndclass.style = CS_HREDRAW CS_VREDRAW; wndclass.lpfnwndproc = WndProc; wndclass.cbclsextra = 0; wndclass.cbwndextra = 0; wndclass.hinstance = hinstance; wndclass.hicon = LoadImage (0, IDI_APPLICATION, IMAGE_ICON, 0, 0, 0); wndclass.hcursor = LoadImage (0, IDC_ARROW, IMAGE_CURSOR, 0, 0, 0); wndclass.hbrbackground = (HBRUSH) GetStockObject (WHITE_BRUSH); wndclass.lpszmenuname = NULL ; wndclass.lpszclassname = szappname; wndclass.hiconsm = 0; 17

18 LoadImage The LoadImage function loads an icon, cursor, animated cursor, or bitmap. HANDLE LoadImage ( ); HINSTANCE hinst, LPCTSTR lpszname, UINT utype, int cxdesired, int cydesired, UINT fuload // handle to instance // name or identifier of the image // image type // desired width // desired height // load options 註冊視窗類別 完成視窗類別結構的設定後, 接下來要註冊這個視窗類別 : RegisterClassEx (&wndclass); 18

19 建立視窗物件 hwnd = CreateWindowEx ( 0, // extended window style szappname, // window class name "The Hello Program", // window caption WS_OVERLAPPEDWINDOW, // window style CW_USEDEFAULT, // initial x position CW_USEDEFAULT, // initial y position CW_USEDEFAULT, // initial x size CW_USEDEFAULT, // initial y size NULL, // parent window handle NULL, // window menu handle hinstance, // program instance handle NULL) ; // creation parameters CreateWindowEx The CreateWindowEx function creates an overlapped, pop-up, or child window with an extended window style; otherwise, this function is identical to the CreateWindow function. HWND CreateWindowEx ( DWORD dwexstyle, LPCTSTR lpclassname, LPCTSTR lpwindowname, DWORD dwstyle, int x, int y, int nwidth, int nheight, HWND hwndparent, window HMENU hmenu, HINSTANCE hinstance, LPVOID lpparam ); // extended window style // registered class name // window name // window style // horizontal position of window // vertical position of window // window width // window height // handle to parent or owner // menu handle or child identifier // handle to application instance // window-creation data 19

20 顯示視窗 建立視窗物件之後, 我們用下面兩個函式把視窗顯示在螢幕上 : ShowWindow (hwnd, icmdshow) ; UpdateWindow (hwnd) ; ShowWindow 把視窗 hwnd 放到螢幕上, icmdshow 是 WinMain 接收到的視窗顯示方式的參數 UpdateWindow 送 WM_PAINT 訊息到視窗訊息處理函式, 藉此來繪製視窗的內部區域 訊息迴圈 顯示視窗之後, 程式就進入下列的訊息迴圈 : while (GetMessage (&msg, NULL, 0, 0)) TranslateMessage (&msg) ; DispatchMessage (&msg) ; GetMessage 取出下一個訊息的資料並擺入參數 mgs 中 若事件是 WM_QUIT 的話, 函式傳回 0, 而終止迴圈 TranslateMessage 把鍵盤的按鍵碼轉換成字元碼 DispatchMessage 呼叫視窗的訊息處理函式 20

21 變數 msg 的資料型態為底下的 MSG 結構 : typedef struct tagmsg HWND hwnd; // window handle UINT message; // 訊息型態 WPARAM wparam; // 訊息資料 ( 依訊息型態而定 ) LPARAM lparam; // 訊息資料 ( 依訊息型態而定 ) DWORD time; // 訊息發生的時間 POINT pt; // 發生訊息時游標在螢幕上的位置 MSG; typedef struct tagpoint LONG x; LONG y; POINT, *PPOINT; // x 座標 // y 座標 訊息處理函式 LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) switch (message) case WM_CREATE: // do some initialization when window is created return 0 ; case WM_DESTROY: PostQuitMessage (0); return 0; // handle other messages return DefWindowProc (hwnd, message, wparam, lparam) ; 21

22 視窗的訊息處理函式必須宣告成以下的格式 : LRESULT CALLBACK WndProc ( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) ( 你可改用其他函式名稱, 不一定要用 WndProc 這名稱 ) 你不需要在程式中呼叫 WndProc 函式, 因為 DispatchMessage 函式會自動呼叫它, 而且傳入適當的參數值 在 WndProc 中, 我們用 switch 敘述, 依據訊息的型態 (message), 分別做適當的處理 在 case 敘述中, 我們用 Windows 的訊息常數 這些常數都以 WM_ 開頭 (WM 代表 Windows Message) 訊息常數是定義在 winuser.h 中 (windows.h 會自動加入這個檔 ) WM_CREATE 呼叫 CreateWindowEx 函式會產生這個訊息 你可以在這裏加入視窗初始化的程式碼, 然後 return 0 若初始化失敗, 則可以 return ( 1) 來終止視窗 通常這是程式所收到的第一個訊息 WinMain ( ) CreateWindowEx( ); WndProc ( ) switch (message) case WM_CREATE: // winodw initialization return 0; 22

23 WM_DESTROY 這個訊息發生在視窗終止時 ( 例如使用者關閉視窗 ) 通常我們在這裏呼叫 PostQuitMessage (0) 送出 WM_QUIT 訊息來終止事件迴圈 while (GetMessage (&msg, NULL, 0, 0)) TranslateMessage (&msg) ; DispatchMessage (&msg) ; WndProc ( ) switch (message) case WM_DESTROY: PostQuitMessage(0); return 0; Windows 有上百個不同的訊息型態 你可以把不需要特別處理的訊息交給 DefWindowProc 函式來處理 所以 WndProc 最後一行的敘述如下 : return DefWindowProc (hwnd, message, wparam, lparam) ; 寫一般簡單的 Windows 程式時, 你的主要工作就是在 WndProc 中加入適當的程式碼來處理種種的訊息 23

24 視窗程式的骨架 : #include <windows.h> LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ; int WINAPI WinMain (HINSTANCE hinstance, HINSTANCE hprevinstance, PSTR szcmdline, int icmdshow) char szappname[] = "HelloWin"; HWND hwnd ; MSG msg ; WNDCLASSEX wndclass ; wndclass.cbsize = sizeof(wndclassex) ; wndclass.style = CS_HREDRAW CS_VREDRAW ; wndclass.lpfnwndproc = WndProc ; wndclass.cbclsextra = 0 ; wndclass.cbwndextra = 0 ; wndclass.hinstance = hinstance ; wndclass.hicon = LoadImage (0, IDI_APPLICATION, IMAGE_ICON, 0, 0, 0); wndclass.hcursor = LoadImage (0, IDC_ARROW, IMAGE_CURSOR, 0, 0, 0); wndclass.hbrbackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ; wndclass.lpszmenuname = NULL ; wndclass.lpszclassname = szappname ; wndclass.hiconsm = 0 ; RegisterClassEx (&wndclass); hwnd = CreateWindowEx ( 0, szappname, // window class name The Hello Program", // window caption WS_OVERLAPPEDWINDOW, // window style CW_USEDEFAULT, // initial x position CW_USEDEFAULT, // initial y position CW_USEDEFAULT, // initial x size CW_USEDEFAULT, // initial y size NULL, // parent window handle NULL, // window menu handle hinstance, // program instance handle NULL) ; // creation parameters 24

25 ShowWindow (hwnd, icmdshow) ; UpdateWindow (hwnd) ; while (GetMessage (&msg, NULL, 0, 0)) TranslateMessage (&msg) ; DispatchMessage (&msg) ; return msg.wparam ; LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) switch (message) case WM_CREATE: return 0 ; case WM_DESTROY: PostQuitMessage (0) ; return 0 ; return DefWindowProc (hwnd, message, wparam, lparam) ; 25

Microsoft PowerPoint - gp3.ppt

Microsoft PowerPoint - gp3.ppt Windows 視窗程式設計 (2) 靜宜大學資訊管理學系蔡奇偉副教授 大綱 視窗的結構 Painting and Repainting GDI Device Context 視窗版的 Hello, world! 程式 取得裝置的功能資訊 版權所有 : 靜宜大學資訊管理學系蔡奇偉副教授 1 視窗的結構 標題列 (title) 工具列 (tools) 功能表 (menu) 工作區 (client) 狀態列

More information

d2.doc

d2.doc 2 Windows Windows Windows Windows Windows Windows Windows Windows Windows Windows DOS Windows Windows Windows 1.0 Microsoft 2 Windows Windows 1.0 DOS Windows 1.0 80286 8086 Microsoft Windows 2.0 Windows

More information

int *p int a 0x00C7 0x00C7 0x00C int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++;

int *p int a 0x00C7 0x00C7 0x00C int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++; Memory & Pointer trio@seu.edu.cn 2.1 2.1.1 1 int *p int a 0x00C7 0x00C7 0x00C7 2.1.2 2 int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++; 2.1.3 1. 2. 3. 3 int A,

More information

Microsoft PowerPoint - directx01.ppt

Microsoft PowerPoint - directx01.ppt 電腦遊戲程式設計 DirectX 簡介 靜宜大學資訊管理學系蔡奇偉副教授 大綱 何謂 DirectX? DirecX 的模組 HAL 和 HEL COM 檢查安裝的 DirectX 版本 遊戲程式的骨架 DirectX 繪圖程式的骨架 版權所有 : 靜宜大學資管系蔡奇偉副教授 1 何謂 DirectX? Windows API 的架構無法滿足電腦遊戲與多媒體軟體的即時性需求, 因而微軟公司規劃出 DirectX

More information

Microsoft Word - CH07

Microsoft Word - CH07 WSAAsyncSelect 模型開發 WSAAsyncSelect 模型是 Windows Sockets 的一個非同步 I/O 模型 利用該模型應用程式可以在一個 Socket 上, 接收以 Windows 訊息為基礎的網路事件 Windows Sockets 應用程式在建立 Socket 後, 呼叫 WSAAsyncSelect() 函式註冊感興趣的網路事件 當該事件發生時 Windows 視窗收到訊息,

More information

The golden pins of the PCI card can be oxidized after months or years

The golden pins of the PCI card can be oxidized after months or years Q. 如何在 LabWindows/CVI 編譯 DAQ Card 程式? A: 請參考至下列步驟 : 步驟 1: 安裝驅動程式 1. 安裝 UniDAQ 驅動程式 UniDAQ 驅動程式下載位置 : CD:\NAPDOS\PCI\UniDAQ\DLL\Driver\ ftp://ftp.icpdas.com/pub/cd/iocard/pci/napdos/pci/unidaq/dll/driver/

More information

BOOL EnumWindows(WNDENUMPROC lparam); lpenumfunc, LPARAM (Native Interface) PowerBuilder PowerBuilder PBNI 2

BOOL EnumWindows(WNDENUMPROC lparam); lpenumfunc, LPARAM (Native Interface) PowerBuilder PowerBuilder PBNI 2 PowerBuilder 9 PowerBuilder Native Interface(PBNI) PowerBuilder 9 PowerBuilder C++ Java PowerBuilder 9 PBNI PowerBuilder Java C++ PowerBuilder NVO / PowerBuilder C/C++ PowerBuilder 9.0 PowerBuilder Native

More information

Microsoft Word - CIN-DLL.doc

Microsoft Word - CIN-DLL.doc 6.3. 调 用 动 态 链 接 库 (DLL) 相 对 于 CIN 来 讲,NI 更 推 荐 用 户 使 用 DLL 来 共 享 基 于 文 本 编 程 语 言 开 发 的 代 码 除 了 共 享 或 重 复 利 用 代 码, 开 发 人 员 还 能 利 用 DLL 封 装 软 件 的 功 能 模 块, 以 便 这 些 模 块 能 被 不 同 开 发 工 具 利 用 在 LabVIEW 中 使 用

More information

ebook50-11

ebook50-11 11 Wi n d o w s C A D 53 M F C 54 55 56 57 58 M F C 11.1 53 11-1 11-1 MFC M F C C D C Wi n d o w s Wi n d o w s 4 11 199 1. 1) W M _ PA I N T p W n d C W n d C D C * p D C = p W n d GetDC( ); 2) p W n

More information

投影片 1

投影片 1 資料庫管理程式 ( 補充教材 -Part2) 使用 ADO.NET 連結資料庫 ( 自行撰寫程式碼 以實現新增 刪除 修改等功能 ) Private Sub InsertButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles InsertButton.Click ' 宣告相關的 Connection

More information

mfc.doc

mfc.doc SDK 编程讲座 ( 一 ) 摘自 SDK 路报 no.1 ( 电子版 ) Wndows 编程两种方式 : 1.SDK 编程 : 用 C 语言直接调用 Windows API 函数. 这类 API 函数有上千个 ; 2.MFC 编程 : 用类将上述 API 封装起来, 用 C++ 来调用. 一般只需 20 多个 windows 类和另外 20 多个通用的非 windows 类就可 " 干活 " 了.

More information

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.06.doc

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.06.doc 2 5 8 11 0 13 1. 13 2. 15 3. 18 1 23 1. 23 2. 26 3. 28 2 36 1. 36 2. 39 3. 42 4. 44 5. 49 6. 51 3 57 1. 57 2. 60 3. 64 4. 66 5. 70 6. 75 7. 83 8. 85 9. 88 10. 98 11. 103 12. 108 13. 112 4 115 1. 115 2.

More information

概述

概述 OPC Version 1.6 build 0910 KOSRDK Knight OPC Server Rapid Development Toolkits Knight Workgroup, eehoo Technology 2002-9 OPC 1...4 2 API...5 2.1...5 2.2...5 2.2.1 KOS_Init...5 2.2.2 KOS_InitB...5 2.2.3

More information

FY.DOC

FY.DOC 高 职 高 专 21 世 纪 规 划 教 材 C++ 程 序 设 计 邓 振 杰 主 编 贾 振 华 孟 庆 敏 副 主 编 人 民 邮 电 出 版 社 内 容 提 要 本 书 系 统 地 介 绍 C++ 语 言 的 基 本 概 念 基 本 语 法 和 编 程 方 法, 深 入 浅 出 地 讲 述 C++ 语 言 面 向 对 象 的 重 要 特 征 : 类 和 对 象 抽 象 封 装 继 承 等 主

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 9 [P.11] : Dev C++ [P.12] : http://c.feis.tw [P.13] [P.14] [P.15] [P.17] [P.23] Dev C++ [P.24] [P.27] [P.34] C / C++ [P.35] 10 C / C++ C C++ C C++ C++ C ( ) C++

More information

INTRODUCTION TO COM.DOC

INTRODUCTION TO COM.DOC How About COM & ActiveX Control With Visual C++ 6.0 Author: Curtis CHOU mahler@ms16.hinet.net This document can be freely release and distribute without modify. ACTIVEX CONTROLS... 3 ACTIVEX... 3 MFC ACTIVEX

More information

TPM BIOS Infineon TPM Smart TPM Infineon TPM Smart TPM TPM Smart TPM TPM Advanced Mode...8

TPM BIOS Infineon TPM Smart TPM Infineon TPM Smart TPM TPM Smart TPM TPM Advanced Mode...8 Smart TPM Rev. 1001 Smart TPM Ultra TPM Smart TPM TPM...3 1. BIOS... 3 2. Infineon TPM Smart TPM... 4 2.1. Infineon TPM...4 2.2. Smart TPM...4 3. TPM... 5 3.1. Smart TPM TPM...5 3.2. Advanced Mode...8

More information

MFC 2/e PDF GBK mirror - anyway solution MFC 1/e MFC 2/e

MFC 2/e PDF     GBK mirror - anyway solution MFC 1/e MFC 2/e 2/e 1998/04 MFC 1/e Windows MFC MFC 2/e 1998/05 1998 UNALIS 3/e 2/e 2/e 3/e 3/e MFC 2/e MFC 3/e MFC MFC 2/e VC5+MFC42 VC6+MFC421 MFC 2/e 1 MFC 2/e PDF http://www.jjhou.com http://expert.csdn.net/jjhou

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 49 [P.51] C/C++ [P.52] [P.53] [P.55] (int) [P.57] (float/double) [P.58] printf scanf [P.59] [P.61] ( / ) [P.62] (char) [P.65] : +-*/% [P.67] : = [P.68] : ,

More information

C/C++程序设计 - 字符串与格式化输入/输出

C/C++程序设计 - 字符串与格式化输入/输出 C/C++ / Table of contents 1. 2. 3. 4. 1 i # include # include // density of human body : 1. 04 e3 kg / m ^3 # define DENSITY 1. 04 e3 int main ( void ) { float weight, volume ; int

More information

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc References (Section 5.2) Hsuan-Tien Lin Deptartment of CSIE, NTU OOP Class, March 15-16, 2010 H.-T. Lin (NTU CSIE) References OOP 03/15-16/2010 0 / 22 Fun Time (1) What happens in memory? 1 i n t i ; 2

More information

PowerPoint Presentation

PowerPoint Presentation 列 Kernel Objects Windows Kernel Object 來 理 行 行 What is a Kernel Object? The data structure maintains information about the object Process Object: 錄了 PID, priority, exit code File Object: 錄了 byte offset,

More information

<4D6963726F736F667420576F7264202D20A6D9A6D7B5E4C159B177AACCB971B8A3BFE9A44AB8CBB86D>

<4D6963726F736F667420576F7264202D20A6D9A6D7B5E4C159B177AACCB971B8A3BFE9A44AB8CBB86D> Journal of China University of Science and Technology Vol.59-2014.04 肌 肉 萎 縮 患 者 電 腦 輸 入 裝 置 Assisted Computer Entry Device for Muscular Atrophy Patient 蔡 樸 生 Pu-Sheng Tsai 中 華 科 技 大 學 電 子 系 副 教 授 Department

More information

Excel VBA Excel Visual Basic for Application

Excel VBA  Excel Visual Basic for Application Excel VBA Jun5,00 Sub 分頁 () Dim i As Integer Dim Cname As String Dim Code As Variant Set score=thisworkbook.sheets("sheet") Code=Array(" 專北一 "," 專北二 "," 專北三 "," 專桃園 "," 專桃竹 "," 專中苗 ", " 專台中 "," 專台南 ","

More information

0 0 = 1 0 = 0 1 = = 1 1 = 0 0 = 1

0 0 = 1 0 = 0 1 = = 1 1 = 0 0 = 1 0 0 = 1 0 = 0 1 = 0 1 1 = 1 1 = 0 0 = 1 : = {0, 1} : 3 (,, ) = + (,, ) = + + (, ) = + (,,, ) = ( + )( + ) + ( + )( + ) + = + = = + + = + = ( + ) + = + ( + ) () = () ( + ) = + + = ( + )( + ) + = = + 0

More information

1. 注册自己的控件类 我把控件类名称定义为 "HyperLinkCtrl", 还要为窗口额外分配空间, 这样才能迚行更多的控制 // 注册控件类 ATOM WINAPI RegisterHyperLinkCtrl(HINSTANCE hins) WNDCLASSEX wndclass; ZeroM

1. 注册自己的控件类 我把控件类名称定义为 HyperLinkCtrl, 还要为窗口额外分配空间, 这样才能迚行更多的控制 // 注册控件类 ATOM WINAPI RegisterHyperLinkCtrl(HINSTANCE hins) WNDCLASSEX wndclass; ZeroM Win32 编程迚阶 : 打造自己的标准控件作者 :cntrump 前言 Windows 给我们提供了很多的标准控件, 基本上够用的 但是有时候我们会对标准控件丌满意, 这时候就可以考虑自己编写控件 本教程的目的是编写一个出一个简单的标准控件, 作用类似于网页上的超链接, 除了可以接受 Windows 常规消息还可以处理控件自定义的消息 程序运行的效果如下 : 鼠标点击之后就会打开在程序中所指定的链接

More information

VB程序设计教程

VB程序设计教程 高 等 学 校 教 材 Visual Basic 程 序 设 计 教 程 魏 东 平 郑 立 垠 梁 玉 环 石 油 大 学 出 版 社 内 容 提 要 本 书 是 按 高 等 学 校 计 算 机 程 序 设 计 课 程 教 学 大 纲 编 写 的 大 学 教 材, 主 要 包 括 VB 基 础 知 识 常 用 程 序 结 构 和 算 法 Windows 用 户 界 面 设 计 基 础 文 件 处

More information

C/C++ - 文件IO

C/C++ - 文件IO C/C++ IO Table of contents 1. 2. 3. 4. 1 C ASCII ASCII ASCII 2 10000 00100111 00010000 31H, 30H, 30H, 30H, 30H 1, 0, 0, 0, 0 ASCII 3 4 5 UNIX ANSI C 5 FILE FILE 6 stdio.h typedef struct { int level ;

More information

Microsoft Word - 11.doc

Microsoft Word - 11.doc 除 錯 技 巧 您 將 於 本 章 學 到 以 下 各 項 : 如 何 在 Visual C++ 2010 的 除 錯 工 具 控 制 下 執 行 程 式? 如 何 逐 步 地 執 行 程 式 的 敘 述? 如 何 監 看 或 改 變 程 式 中 的 變 數 值? 如 何 監 看 程 式 中 計 算 式 的 值? 何 謂 Call Stack? 何 謂 診 斷 器 (assertion)? 如 何

More information

epub83-1

epub83-1 C++Builder 1 C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r 1.1 1.1.1 1-1 1. 1-1 1 2. 1-1 2 A c c e s s P a r a d o x Visual FoxPro 3. / C / S 2 C + + B u i l d e r / C

More information

46 2011 11 467 數位遊戲式學習系統 7 2011 11 467 47 3 DBGameSys 48 2011 11 467 正規化資料模組 如何配置並儲存電子化資料 以 便減少資料被重覆儲存的程序 DBGameSys的主要功能模組包 學習者 審核評分模組 含 正規化資料模組 審核評分 模組 高分列表模組3大區塊 系統資料庫 在正規化資料模組的執行 高分列表模組 過程中 先要求學習者瀏覽遊戲

More information

PowerPoint 簡報

PowerPoint 簡報 Paint 繪圖板 JAVA 程式設計 指導老師 : 鄞宗賢 組員 : 4A3G0901 劉彥佐 4A3G0907 韓偉志 畫面預覽 匯入參數 package paint; import java.awt.*; import java.awt.event.*; import javax.swing.*; 主程式 public class paint{ public static void main(string[]

More information

游戏厅捕鱼技巧_天天酷跑游戏技巧 2048游戏技巧,游戏厅打鱼技巧_

游戏厅捕鱼技巧_天天酷跑游戏技巧 2048游戏技巧,游戏厅打鱼技巧_ 游 戏 厅 捕 鱼 技 巧 _ 天 天 酷 跑 游 戏 技 巧 巧 _ 2048 游 戏 技 巧, 游 戏 厅 打 鱼 技 152 http://www.500630.com 游 戏 厅 捕 鱼 技 巧 _ 天 天 酷 跑 游 戏 技 巧 2048 游 戏 技 巧, 游 戏 厅 打 鱼 技 巧 _ 现 在 拦 截 api 游 戏 厅 打 鱼 技 巧 的 教 程 到 处 都 是, 我 就 不 列 举

More information

Microsoft PowerPoint - OPVB1基本VB.ppt

Microsoft PowerPoint - OPVB1基本VB.ppt 大 綱 0.VB 能 做 什 麼? CH1 VB 基 本 認 識 1.VB 歷 史 與 版 本 2.VB 環 境 簡 介 3. 即 時 運 算 視 窗 1 0.VB 能 做 什 麼? Visual Basic =>VB=> 程 式 設 計 語 言 => 設 計 程 式 設 計 你 想 要 的 功 能 的 程 式 自 動 化 資 料 庫 計 算 模 擬 遊 戲 網 路 監 控 實 驗 輔 助 自 動

More information

untitled

untitled 3 C++ 3.1 3.2 3.3 3.4 new delete 3.5 this 3.6 3.7 3.1 3.1 class struct union struct union C class C++ C++ 3.1 3.1 #include struct STRING { typedef char *CHARPTR; // CHARPTR s; // int strlen(

More information

ebook

ebook 3 3 3.1 3.1.1 ( ) 90 3 1966 B e r n s t e i n P ( i ) R ( i ) W ( i P ( i P ( j ) 1) R( i) W( j)=φ 2) W( i) R( j)=φ 3) W( i) W( j)=φ 3.1.2 ( p r o c e s s ) 91 Wi n d o w s Process Control Bl o c k P C

More information

C 1

C 1 C homepage: xpzhangme 2018 5 30 C 1 C min(x, y) double C // min c # include # include double min ( double x, double y); int main ( int argc, char * argv []) { double x, y; if( argc!=

More information

untitled

untitled 1 Outline 數 料 數 數 列 亂數 練 數 數 數 來 數 數 來 數 料 利 料 來 數 A-Z a-z _ () 不 數 0-9 數 不 數 SCHOOL School school 數 讀 school_name schoolname 易 不 C# my name 7_eleven B&Q new C# (1) public protected private params override

More information

新版 明解C++入門編

新版 明解C++入門編 511!... 43, 85!=... 42 "... 118 " "... 337 " "... 8, 290 #... 71 #... 413 #define... 128, 236, 413 #endif... 412 #ifndef... 412 #if... 412 #include... 6, 337 #undef... 413 %... 23, 27 %=... 97 &... 243,

More information

Autodesk Product Design Suite Standard 系統統需求 典型使用用者和工作流程 Autodesk Product Design Suite Standard 版本為為負責建立非凡凡產品的設計師師和工程師, 提供基本概念設計計和製圖工具, 以取得令人驚驚嘆

Autodesk Product Design Suite Standard 系統統需求 典型使用用者和工作流程 Autodesk Product Design Suite Standard 版本為為負責建立非凡凡產品的設計師師和工程師, 提供基本概念設計計和製圖工具, 以取得令人驚驚嘆 Autodesk Product Design Suite Standard 20122 系統統需求 典型使用用者和工作流程 Autodesk Product Design Suite Standard 版本為為負責建立非凡凡產品的設計師師和工程師, 提供基本概念設計計和製圖工具, 以取得令人驚驚嘆的產品設計計 Autodesk Product Design Suite Standard 版本中中包括以下軟體體產品

More information

3.1 num = 3 ch = 'C' 2

3.1 num = 3 ch = 'C' 2 Java 1 3.1 num = 3 ch = 'C' 2 final 3.1 final : final final double PI=3.1415926; 3 3.2 4 int 3.2 (long int) (int) (short int) (byte) short sum; // sum 5 3.2 Java int long num=32967359818l; C:\java\app3_2.java:6:

More information

主程式 : public class Main3Activity extends AppCompatActivity { ListView listview; // 先整理資料來源,listitem.xml 需要傳入三種資料 : 圖片 狗狗名字 狗狗生日 // 狗狗圖片 int[] pic =new

主程式 : public class Main3Activity extends AppCompatActivity { ListView listview; // 先整理資料來源,listitem.xml 需要傳入三種資料 : 圖片 狗狗名字 狗狗生日 // 狗狗圖片 int[] pic =new ListView 自訂排版 主程式 : public class Main3Activity extends AppCompatActivity { ListView listview; // 先整理資料來源,listitem.xml 需要傳入三種資料 : 圖片 狗狗名字 狗狗生日 // 狗狗圖片 int[] pic =new int[]{r.drawable.dog1, R.drawable.dog2,

More information

Microsoft PowerPoint - ch6 [相容模式]

Microsoft PowerPoint - ch6 [相容模式] UiBinder wzyang@asia.edu.tw UiBinder Java GWT UiBinder XML UI i18n (widget) 1 2 UiBinder HelloWidget.ui.xml: UI HelloWidgetBinder HelloWidget.java XML UI Owner class ( Composite ) UI XML UiBinder: Owner

More information

C语言的应用.PDF

C语言的应用.PDF AVR C 9 1 AVR C IAR C, *.HEX, C,,! C, > 9.1 AVR C MCU,, AVR?! IAR AVR / IAR 32 ALU 1KBytes - 8MBytes (SPM ) 16 MBytes C C *var1, *var2; *var1++ = *--var2; AVR C 9 2 LD R16,-X ST Z+,R16 Auto (local

More information

Microsoft PowerPoint - 07-overloaded.ppt

Microsoft PowerPoint - 07-overloaded.ppt Overloaded Functions 前言 處理多載函式宣告的規則 處理多載函式呼叫的規則 多載函式與 scope 函式呼叫的議決 前言 C 語言規定 : 函式的名稱不可相同 這樣的規定使得我們必須為功能相近但參數型態相異的函式取不同的名稱, 譬如 : int imax (int, int); double dmax (double, double ); // max function for

More information

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.07.doc

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.07.doc 2 5 8 11 0 1. 13 2. 15 3. 18 1 1. 22 2. 25 3. 27 2 1. 35 2. 38 3. 41 4. 43 5. 48 6. 50 3 1. 56 2. 59 3. 63 4. 65 5. 69 13 22 35 56 6. 74 7. 82 8. 84 9. 87 10. 97 11. 102 12. 107 13. 111 4 114 1. 114 2.

More information

用手機直接傳值不透過網頁連接, 來當作搖控器控制家電 ( 電視遙控器 ) 按下按鍵發送同時會回傳值來確定是否有送出 問題 :1. 應該是使用了太多 thread 導致在傳值上有問題 2. 一次按很多次按鈕沒辦法即時反應

用手機直接傳值不透過網頁連接, 來當作搖控器控制家電 ( 電視遙控器 ) 按下按鍵發送同時會回傳值來確定是否有送出 問題 :1. 應該是使用了太多 thread 導致在傳值上有問題 2. 一次按很多次按鈕沒辦法即時反應 專題進度 老師 : 趙啟時老師 學生 : 陳建廷 2013/10/13 用手機直接傳值不透過網頁連接, 來當作搖控器控制家電 ( 電視遙控器 ) 按下按鍵發送同時會回傳值來確定是否有送出 問題 :1. 應該是使用了太多 thread 導致在傳值上有問題 2. 一次按很多次按鈕沒辦法即時反應 程式碼 : package com.example.phone; import java.util.arraylist;

More information

(Microsoft Word - Motion Program \270\305\264\272\276\363 \307\245\301\366 \271\327 \270\361\302\367.doc)

(Microsoft Word - Motion Program \270\305\264\272\276\363 \307\245\301\366 \271\327 \270\361\302\367.doc) : TBFAT-G5MP-MN004-11 1 GX Series PLC Program Manual 2 GX Series PLC Program Manual Contents Contents...3 1... 1-1 1.1... 1-2 1.2... 1-3 1.2.1... 1-3 1.2.2... 1-4 1.2.3... 1-4 1.2.4... 1-6 1.3... 1-7 1.3.1...

More information

使用手冊

使用手冊 使用手冊 版權所有 2013 年 Microtek International, Inc. 保留所有權利 商標 Microtek MII MiiNDT ScanWizard Microtek International, Inc. Windows Microsoft Corporation 重要須知 Microtek Microtek Windows Microsoft Windows I49-004528

More information

6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C C C51 C51 ANSI C MCS-51 C51 ANSI C C C51 bit Byte bit sbit

6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C C C51 C51 ANSI C MCS-51 C51 ANSI C C C51 bit Byte bit sbit 6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C51 6.1 C51 6.1.1 C51 C51 ANSI C MCS-51 C51 ANSI C C51 6.1 6.1 C51 bit Byte bit sbit 1 0 1 unsigned char 8 1 0 255 Signed char 8 11 128

More information

新・明解C言語入門編『索引』

新・明解C言語入門編『索引』 !... 75!=... 48 "... 234 " "... 9, 84, 240 #define... 118, 213 #include... 148 %... 23 %... 23, 24 %%... 23 %d... 4 %f... 29 %ld... 177 %lf... 31 %lu... 177 %o... 196 %p... 262 %s... 242, 244 %u... 177

More information

輕鬆學 Dreamweaver CS5 網頁設計..\Example\Ch0\ \.html..\example\ch0\ \mouse.txt..\example\ch0\ \ _Ok.html 學習重點 JavaScript 複製程式碼 mouse.txt Ctrl+C Ctrl+C 0-4

輕鬆學 Dreamweaver CS5 網頁設計..\Example\Ch0\ \.html..\example\ch0\ \mouse.txt..\example\ch0\ \ _Ok.html 學習重點 JavaScript 複製程式碼 mouse.txt Ctrl+C Ctrl+C 0-4 JAVA Extension 0..\Example\Ch0\ \ T.html..\Example\Ch0\ \ T.txt T.txt..\Example\Ch0\ \ T_Ok.html 提示 :. Marquee Marquee Font Color #FFFFFF BG Color #867bf Width 90 Height 50. T.txt Ctrl+C your scrolling

More information

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File 51 C 51 51 C C C C C C * 2003-3-30 pnzwzw@163.com C C C C KEIL uvision2 MCS51 PLM C VC++ 51 KEIL51 KEIL51 KEIL51 KEIL 2K DEMO C KEIL KEIL51 P 1 1 1 1-1 - 1 Project New Project 1 2 Windows 1 3 N C test

More information

Microsoft Word - ACG chapter00c-3ed.docx

Microsoft Word - ACG chapter00c-3ed.docx Python 好好玩, 趣學電玩遊戲程式設計 Python Python BASIC Java JavaScript PHP C++ BASIC Python Python Python Xbox PlayStation Nintendo - 2 - 簡介 : 互動式 Python Shell : 編寫程式 Python File editor : 猜數字 : 腦筋急轉彎 : 龍域 ( ) : 使用

More information

投影片 1

投影片 1 軟體說明書繁體中文 RGB A 目錄 - CONTENTS 01 09 15 17 22 軟體主介面 巨集設定說明 主介面概觀 個人設定檔 (Profiles) 一般模式 / 遊戲模式 按鍵功能分配 巨集管理器概觀 巨集管理器 巨集錄製設定 巨集錄製時間列表 插入指令 閃移系統 - I.S.S (Instant Shift System) 燈光設定更新韌體 閃移系統啟動鈕設定說明 燈光設定介面 介面區域一

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 177 [P179] (1) - [P181] [P182] (2) - for [P183] (3) - switch [P184] [P187] [P189] [P194] 178 [ ]; : : int var; : int var[3]; var 2293620 var[0] var[1] 2293620

More information

mvc

mvc Build an application Tutor : Michael Pan Application Source codes - - Frameworks Xib files - - Resources - ( ) info.plist - UIKit Framework UIApplication Event status bar, icon... delegation [UIApplication

More information

前言 C# C# C# C C# C# C# C# C# microservices C# More Effective C# More Effective C# C# C# C# Effective C# 50 C# C# 7 Effective vii

前言 C# C# C# C C# C# C# C# C# microservices C# More Effective C# More Effective C# C# C# C# Effective C# 50 C# C# 7 Effective vii 前言 C# C# C# C C# C# C# C# C# microservices C# More Effective C# More Effective C# C# C# C# Effective C# 50 C# C# 7 Effective vii C# 7 More Effective C# C# C# C# C# C# Common Language Runtime CLR just-in-time

More information

運算子多載 Operator Overloading

運算子多載 Operator Overloading 多型 Polymorphism 講師 : 洪安 1 多型 編譯時期多型 ( 靜態多型 ) function overloading 如何正確呼叫同名的函數? 利用參數個數與型態 operator overloading 其實同 function overloading 執行時期多型 ( 或動態多型 ) 如何正確呼叫不同物件的相同名稱的成員函數 利用繼承與多型 2 子類別與父類別物件間的指定 (assignment)

More information

c_cpp

c_cpp C C++ C C++ C++ (object oriented) C C++.cpp C C++ C C++ : for (int i=0;i

More information

C/C++语言 - C/C++数据

C/C++语言 - C/C++数据 C/C++ C/C++ Table of contents 1. 2. 3. 4. char 5. 1 C = 5 (F 32). 9 F C 2 1 // fal2cel. c: Convert Fah temperature to Cel temperature 2 # include < stdio.h> 3 int main ( void ) 4 { 5 float fah, cel ;

More information

Microsoft Word - 01.DOC

Microsoft Word - 01.DOC 第 1 章 JavaScript 简 介 JavaScript 是 NetScape 公 司 为 Navigator 浏 览 器 开 发 的, 是 写 在 HTML 文 件 中 的 一 种 脚 本 语 言, 能 实 现 网 页 内 容 的 交 互 显 示 当 用 户 在 客 户 端 显 示 该 网 页 时, 浏 览 器 就 会 执 行 JavaScript 程 序, 用 户 通 过 交 互 式 的

More information

資料結構之C語言重點複習

資料結構之C語言重點複習 鏈結串列自編教材 ( 一 ) 本教材 ( 一 ) 目標問題 : 每次以亂數產生一 [0,1000] 之整數值, 若該值 >100, 則以同方式繼續產生下一亂數值, 若該值

More information

( )... 5 ( ) ( )

( )... 5 ( ) ( ) 2016 大學校院招收大陸地區學生聯合招生委員會 71005 臺南市永康區南臺街 1 號 E-mail:rusen@stust.edu.tw WEB:http://rusen.stust.edu.tw TEL:+886-6-2435163 FAX:+886-6-2435165 2 0 1 6 0 1 1 9 2016... 2... 3... 5 ( )... 5 ( )... 5 1... 6 2...

More information

Microsoft Word - ACL chapter02-5ed.docx

Microsoft Word - ACL chapter02-5ed.docx 第 2 章神奇的質數 2.1.1 什麼是質數 1 1 1 打下好基礎 - 程式設計必修的數學思維與邏輯訓練 1 1 0 10 2 3 5 7 4 6 8 9 10 4 10000 1229 1000 168 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131

More information

C/C++ 语言 - 循环

C/C++ 语言 - 循环 C/C++ Table of contents 7. 1. 2. while 3. 4. 5. for 6. 8. (do while) 9. 10. (nested loop) 11. 12. 13. 1 // summing.c: # include int main ( void ) { long num ; long sum = 0L; int status ; printf

More information

C PICC C++ C++ C C #include<pic.h> C static volatile unsigned char 0x01; static volatile unsigned char 0x02; static volatile unsigned cha

C PICC C++ C++ C C #include<pic.h> C static volatile unsigned char 0x01; static volatile unsigned char 0x02; static volatile unsigned cha CYPOK CYPOK 1 UltraEdit Project-->Install Language Tool: Language Suite----->hi-tech picc Tool Name ---->PICC Compiler Executable ---->c:hi-picinpicc.exe ( Command-line Project-->New Project-->File Name--->myc

More information

封面-12

封面-12 第十二章 701Client TECHNOLOGY CO.,LTD. 701Client 701Server 701Client "701Client", 12-1 :supervisor :supervisor : 1. : 00~99 100 2. : 00~63 ( 63 / / ) 3. : 18 9 4. : 18 9 5. 12-2 TECHNOLOGY CO.,LTD. 701Client

More information

運算子多載 Operator Overloading

運算子多載 Operator Overloading 函數樣板 (Function Template) 與 類別樣板 (Class Template) 講師 : 洪安 1 資料結構與 C++ 程式設計進階班 為何需要通用函數? (1/2) int abs(int x) { return (x>0)?x:-x; 取名困難不好記 float fabs(float x) { return (x>0)?x:-x; complex cabs(complex x)

More information

1

1 磁軌式讀卡機 1288 系列 使用手冊 Version 1.0 1 2 3 4 5 6 7 8 9 10 11 12 1288 MSR Micro controller : With Decoder Open Visual COM port to read data (UART Interface) From 1288 Or direct control 1288 by sending Command

More information

概述

概述 OPC Version 1.8 build 0925 KOCRDK Knight OPC Client Rapid Development Toolkits Knight Workgroup, eehoo Technology 2002-9 OPC 1...4 2 API...5 2.1...5 2.2...5 2.2.1 KOC_Init...5 2.2.2 KOC_Uninit...5 2.3...5

More information

C++ 程序设计 告别 OJ1 - 参考答案 MASTER 2019 年 5 月 3 日 1

C++ 程序设计 告别 OJ1 - 参考答案 MASTER 2019 年 5 月 3 日 1 C++ 程序设计 告别 OJ1 - 参考答案 MASTER 2019 年 月 3 日 1 1 INPUTOUTPUT 1 InputOutput 题目描述 用 cin 输入你的姓名 ( 没有空格 ) 和年龄 ( 整数 ), 并用 cout 输出 输入输出符合以下范例 输入 master 999 输出 I am master, 999 years old. 注意 "," 后面有一个空格,"." 结束,

More information

Chapter 9: Objects and Classes

Chapter 9: Objects and Classes What is a JavaBean? JavaBean Java JavaBean Java JavaBean JComponent tooltiptext font background foreground doublebuffered border preferredsize minimumsize maximumsize JButton. Swing JButton JButton() JButton(String

More information

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO Car DVD New GUI IR Flow User Manual V0.1 Jan 25, 2008 19, Innovation First Road Science Park Hsin-Chu Taiwan 300 R.O.C. Tel: 886-3-578-6005 Fax: 886-3-578-4418 Web: www.sunplus.com Important Notice SUNPLUS

More information

C++ 程式設計

C++ 程式設計 C C 料, 數, - 列 串 理 列 main 數串列 什 pointer) 數, 數, 數 數 省 不 不, 數 (1) 數, 不 數 * 料 * 數 int *int_ptr; char *ch_ptr; float *float_ptr; double *double_ptr; 數 (2) int i=3; int *ptr; ptr=&i; 1000 1012 ptr 數, 數 1004

More information

Guide to Install SATA Hard Disks

Guide to Install SATA Hard Disks SATA RAID 1. SATA. 2 1.1 SATA. 2 1.2 SATA 2 2. RAID (RAID 0 / RAID 1 / JBOD).. 4 2.1 RAID. 4 2.2 RAID 5 2.3 RAID 0 6 2.4 RAID 1.. 10 2.5 JBOD.. 16 3. Windows 2000 / Windows XP 20 1. SATA 1.1 SATA Serial

More information

Microsoft Word - 2CA13內文.doc

Microsoft Word - 2CA13內文.doc 006 公 民 - 歷 屆 試 題 全 解 答 案 是 完 全 正 確 的? : 能 源 使 用 愈 多, 除 了 帶 來 經 濟 成 長 外, 相 對 的, 也 會 帶 來 負 面 的 環 保 問 題 我 們 在 發 展 經 濟 的 過 程 中, 若 不 能 兼 顧 環 境 資 源 的 保 育, 將 賠 上 後 代 子 孫 的 生 存 環 境, 這 是 下 列 那 一 種 理 念? 比 較 利 益

More information

Python a p p l e b e a r c Fruit Animal a p p l e b e a r c 2-2

Python a p p l e b e a r c Fruit Animal a p p l e b e a r c 2-2 Chapter 02 變數與運算式 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.2 2.2.1 2.2.2 2.2.3 type 2.2.4 2.3 2.3.1 print 2.3.2 input 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 + 2.4.6 Python Python 2.1 2.1.1 a p p l e b e a r c 65438790

More information

( CIP) /. :, ( ) ISBN TP CIP ( 2005) : : : : * : : 174 ( A ) : : ( 023) : ( 023)

( CIP) /. :, ( ) ISBN TP CIP ( 2005) : : : : * : : 174 ( A ) : : ( 023) : ( 023) ( CIP) /. :, 2005. 2 ( ) ISBN 7-5624-3339-9.......... TP311. 1 CIP ( 2005) 011794 : : : : * : : 174 ( A ) :400030 : ( 023) 65102378 65105781 : ( 023) 65103686 65105565 : http: / /www. cqup. com. cn : fxk@cqup.

More information

Microsoft PowerPoint - Class5.pptx

Microsoft PowerPoint - Class5.pptx C++ 程式初探 V 2015 暑期 ver. 1.0.1 C++ 程式語言 大綱 1. 大量檔案讀取 & 計算 2. 指標 3. 動態記憶體 & 動態陣列 4. 標準函式庫 (STL) vector, algorithm 5. 結構與類別 2 大量檔案讀取 & 計算 若目前有一個程式將讀取純文字文件 (.txt) 中的整數, 並將該文件中的整數有小到大排序後, 儲存到另外一個新的純文字件中 假設有

More information

untitled

untitled MODBUS 1 MODBUS...1 1...4 1.1...4 1.2...4 1.3...4 1.4... 2...5 2.1...5 2.2...5 3...6 3.1 OPENSERIAL...6 3.2 CLOSESERIAL...8 3.3 RDMULTIBIT...8 3.4 RDMULTIWORD...9 3.5 WRTONEBIT...11 3.6 WRTONEWORD...12

More information

51 C 51 isp 10 C PCB C C C C KEIL

51 C 51 isp 10   C   PCB C C C C KEIL http://wwwispdowncom 51 C " + + " 51 AT89S51 In-System-Programming ISP 10 io 244 CPLD ATMEL PIC CPLD/FPGA ARM9 ISP http://wwwispdowncom/showoneproductasp?productid=15 51 C C C C C ispdown http://wwwispdowncom

More information

Go构建日请求千亿微服务最佳实践的副本

Go构建日请求千亿微服务最佳实践的副本 Go 构建 请求千亿级微服务实践 项超 100+ 700 万 3000 亿 Goroutine & Channel Goroutine Channel Goroutine func gen() chan int { out := make(chan int) go func(){ for i:=0; i

More information

1

1 守大學電機系 電腦視覺 報告 單元一 數位影像 : 格式和操作 參考解答 MIAT( 機器智慧與自動化技術 ) 實驗室 中華民國 93 年 9 月 29 日 1. (a) 如果指紋影像 finger300x300 的取像面積是 14(mm)x14(mm), 請計算取像系統的 dpi (b) 如果 kaoshiung512x512 遙測影像的覆蓋面積是 5(Km)x5(Km), 請計算該影像的解析度

More information

C

C C 2017 4 1 1. 2. while 3. 4. 5. for 6. 2/161 C 7. 8. (do while) 9. 10. (nested loop) 11. 12. 3/161 C 1. I 1 // summing.c: 2 #include 3 int main(void) 4 { 5 long num; 6 long sum = 0L; 7 int status;

More information

untitled

untitled 不 料 料 例 : ( 料 ) 串 度 8 年 數 串 度 4 串 度 數 數 9- ( ) 利 數 struct { ; ; 數 struct 數 ; 9-2 數 利 數 C struct 數 ; C++ 數 ; struct 省略 9-3 例 ( 料 例 ) struct people{ char name[]; int age; char address[4]; char phone[]; int

More information

RUN_PC連載_10_.doc

RUN_PC連載_10_.doc PowerBuilder 8 (10) Jaguar CTS ASP Jaguar CTS PowerDynamo Jaguar CTS Microsoft ASP (Active Server Pages) ASP Jaguar CTS ASP Jaguar CTS ASP Jaguar CTS ASP Jaguar CTS ASP Jaguar CTS ASP Jaguar Server ASP

More information

Microsoft PowerPoint - os_4.ppt

Microsoft PowerPoint - os_4.ppt 行 程 資 科 系 林 偉 川 行 程 概 念 行 程 與 程 式 主 要 的 不 同 點 : 程 式 是 被 放 在 外 部 的 儲 存 裝 置 如 磁 碟 上, 而 行 程 則 被 放 在 記 憶 體 中 程 式 在 儲 存 裝 置 中 是 靜 態 的, 而 行 程 在 記 憶 體 中 是 動 態 的, 它 會 隨 著 一 些 事 件 的 發 生 而 產 生 相 對 的 改 變 行 程, 就 是

More information

Windows XP

Windows XP Windows XP What is Windows XP Windows is an Operating System An Operating System is the program that controls the hardware of your computer, and gives you an interface that allows you and other programs

More information

提纲 1 2 OS Examples for 3

提纲 1 2 OS Examples for 3 第 4 章 Threads2( 线程 2) 中国科学技术大学计算机学院 October 28, 2009 提纲 1 2 OS Examples for 3 Outline 1 2 OS Examples for 3 Windows XP Threads I An Windows XP application runs as a seperate process, and each process may

More information

bingdian001.com

bingdian001.com 1. DLL(Dynamic Linkable Library) DLL ± lib EXE DLL DLL EXE EXE ± EXE DLL 1 DLL DLL DLL Windows DLL Windows API Visual Basic Visual C++ Delphi 2 Windows system32 kernel32.dll user32.dll gdi32.dll windows

More information

epub 94-3

epub 94-3 3 A u t o C A D L AY E R L I N E T Y P E O S N A P S T Y L E X R E F - AutoLISP Object ARX A u t o C A D D C L A u t o C A D A u t o d e s k P D B D C L P D B D C L D C L 3.1 Wi n d o w s A u t o C A D

More information

Programming Microsoft Windows CE .NET.doc

Programming Microsoft Windows CE .NET.doc Programming Microsoft Windows CE.NET, Third Edition by Douglas Boling Microsoft Press 2003 (1224 pages) ISBN:0735618844 作者对如何把 Windows 嵌入式程序设计经验应用到 Windows CE.NET 环境里做了娴熟的示范 这这个环境里, 可以为支持 Windows 的 Pocket

More information

K7VT2_QIG_v3

K7VT2_QIG_v3 ............ 1 2 3 4 5 [R] : Enter Raid setup utility 6 Press[A]keytocreateRAID RAID Type: JBOD RAID 0 RAID 1: 2 7 RAID 0 Auto Create Manual Create: 2 RAID 0 Block Size: 16K 32K

More information

Microsoft PowerPoint - Introduction to Windows Programming and MFC

Microsoft PowerPoint - Introduction to Windows Programming and MFC Introduction to Windows Programming and MFC 2006-10 几个重要的概念 Windows 编程基础与消息机制 MFC 框架 重要概念 API SDK DLL and Lib MFC API Application Programming Interface. 其实就是操作系统留给应用程序的一个调用接口, 应用程序通过调用操作系统的 API 而使操作系统去执行应用程序的命令

More information

Panaboard Overlayer help

Panaboard Overlayer help Panaboard Overlayer Image Capture Software for Electronic Whiteboard (Panaboard) ... 3... 5... 6... 13...14 Panaboard Overlayer 1. 2. 3. 4. 4-1. 4-2. [ / ] ( ) 4-3. 5. 6. 6-1. 6-2. [ / ] ( ) 7. Panaboard

More information

TwinCAT 1. TwinCAT TwinCAT PLC PLC IEC TwinCAT TwinCAT Masc

TwinCAT 1. TwinCAT TwinCAT PLC PLC IEC TwinCAT TwinCAT Masc TwinCAT 2001.12.11 TwinCAT 1. TwinCAT... 3 2.... 4... 4...11 3. TwinCAT PLC... 13... 13 PLC IEC 61131-3... 14 4. TwinCAT... 17... 17 5. TwinCAT... 18... 18 6.... 19 Maschine.pro... 19... 27 7.... 31...

More information

ebook51-14

ebook51-14 14 Wi n d o w s M F C 53 54 55 56 ( ) ( Wo r k e r T h r e a d ) 57 ( ) ( U s e r Interface Thread) 58 59 14.1 53 1. 2. C l a s s Wi z a r d O n I d l e () 3. Class Wi z a r d O n I d l e () O n I d l

More information

华恒家庭网关方案

华恒家庭网关方案 LINUX V1.5 1 2 1 2 LINUX WINDOWS PC VC LINUX WINDOWS LINUX 90% GUI LINUX C 3 REDHAT 9 LINUX PC TFTP/NFS http://www.hhcn.com/chinese/embedlinux-res.html minicom NFS mount C HHARM9-EDU 1 LINUX HHARM9-EDU

More information