windows programming -jump from start.txt

          1 動態連接
          Windows 運作機制的核心是一個稱作動態連接的概念


          #include <windows.h>
          int WINAPI WinMain (?HINSTANCE hInstance, HINSTANCE hPrevInstance,
          ???PSTR szCmdLine, int iCmdShow)
          {
          MessageBox (NULL, TEXT ("Hello, Windows 98!"), TEXT ("HelloMsg"), 0);
          return 0 ;
          }

          ?1) #include <windows.h>包含其它的頭文件
          ?2) 程序入口
          ?? int WINAPI WinMain (?HINSTANCE hInstance,HINSTANCE hPrevInstance,
          ??????????? ?PSTR szCmdLine,int iCmdShow)

          ?? a #define WINAPI __stdcall? 指定一個呼叫約定,包括如何生產機器碼,參數如何入棧
          ?? b HINSTANCE hInstance 執行體代號,唯一標識該程序
          ?? c HINSTANCE hPrevInstance 已經不采用
          ?? d PSTR szCmdLine 參數列表
          ?? e int iCmdShow 顯示方式
          ? 3) MessageBox 函數
          ?? MessageBox (NULL, TEXT ("Hello, Windows 98!"), TEXT ("HelloMsg"), 0);
          ?? 參數1 窗體代號
          ?? 參數2 主題顯示文字
          ?? 參數3 標題顯示文字
          ?? 參數4 按鈕,0 為確認 使用C語言的OR(|)操作符號將上面顯示的一個常數與代表內定按鈕的常數組合:

          ?
          #define ?MB_OK?????????????????????? ????0x00000000L
          #define ?MB_OKCANCEL???????????????? ????0x00000001L
          #define ?MB_ABORTRETRYIGNORE???????? ????0x00000002L
          #define ?MB_YESNOCANCEL????????????? ????0x00000003L
          #define ?MB_YESNO??????????????????? ????0x00000004L
          #define ?MB_RETRYCANCEL?

          #define ?MB_DEFBUTTON1?????????????? ????0x00000000L
          #define ?MB_DEFBUTTON2?????????????? ????0x00000100L
          #define ?MB_DEFBUTTON3?????????????? ????0x00000200L
          #define ?MB_DEFBUTTON4

          圖示的外觀
          #define ?MB_ICONHAND???????????????? ?????? 0x00000010L
          #define ?MB_ICONQUESTION???????????? ????????? 0x00000020L
          #define ?MB_ICONEXCLAMATION????????? ????????? 0x00000030L
          #define ?MB_ICONASTERISK

          #define ?MB_ICONWARNING????????????? ?MB_ICONEXCLAMATION
          #define ?MB_ICONERROR??????????????? ?MB_ICONHAND
          #define ?MB_ICONINFORMATION????????? ?MB_ICONASTERISK
          #define ?MB_ICONSTOP

          2 c 語言編譯過程 c--compile --?? .obj?? ---linking----? .exe

          posted on 2006-09-13 16:37 康文 閱讀(226) 評論(0)  編輯  收藏 所屬分類: c\c++

          <2006年9月>
          272829303112
          3456789
          10111213141516
          17181920212223
          24252627282930
          1234567

          導航

          統計

          常用鏈接

          留言簿(1)

          隨筆分類

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 霍林郭勒市| 遂溪县| 奈曼旗| 高陵县| 星座| 兖州市| 探索| 轮台县| 高尔夫| 金塔县| 山丹县| 张掖市| 璧山县| 清丰县| 巢湖市| 襄垣县| 合山市| 霍邱县| 读书| 四会市| 花莲县| 渝北区| 江阴市| 南丹县| 吕梁市| 灵宝市| 白玉县| 托克逊县| 白山市| 开封市| 泰安市| 婺源县| 广汉市| 千阳县| 安化县| 闵行区| 闻喜县| 镇宁| 威远县| 黄梅县| 满洲里市|