<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    神奇好望角 The Magical Cape of Good Hope

    庸人不必自擾,智者何需千慮?
    posts - 26, comments - 50, trackbacks - 0, articles - 11
      BlogJava :: 首頁 ::  :: 聯(lián)系 :: 聚合  :: 管理
    用 NetBeans 開發(fā)一個(gè)簡單的 Windows XP 程序 - 其二 Developing A simple Windows XP Application with NetBeans - Part 2
      在項(xiàng)目節(jié)點(diǎn)上右鍵轉(zhuǎn)到“屬性 → C/C++ → C 編譯器”節(jié)點(diǎn),在“命令行”中設(shè)置“其他選項(xiàng)”為 -mwindows;再轉(zhuǎn)到“鏈接器 → 庫”,單擊“庫”右邊的省略號(hào)按鈕,接著單擊“添加選項(xiàng)”,設(shè)置“其他選項(xiàng)”為 -lcomctl32     Right click the project node and go to "Properties → C/C++ → C Compiler" node, in "Command Line" set "Additonal Options" to -mwindows; then go to "Linker → Libraries", click the ellipsis button to the right of "Libraries", click "Add Option" and set "Other Option" to -lcomctl32.
      這時(shí)如果直接執(zhí)行“生成項(xiàng)目”,則會(huì)輸出以下錯(cuò)誤:     If we directly execute "Build Project" right now, the following errors will be complained:
    1. WinHello.c:6: error: `INITCOMMONCONTROLSEX' undeclared (first use in this function)
    2. WinHello.c:6: error: (Each undeclared identifier is reported only once
    3. WinHello.c:6: error: for each function it appears in.)
    4. WinHello.c:6: error: parse error before "init"
    5. WinHello.c:7: error: `init' undeclared (first use in this function)
    6. WinHello.c:8: error: `ICC_STANDARD_CLASSES' undeclared (first use in this function)
      結(jié)構(gòu)體 INITCOMMONCONTROLSEXcommctrl.h 中聲明,commctrl.h 位于 mingw\include。打開這個(gè)頭文件,查找 INITCOMMONCONTROLSEX,發(fā)現(xiàn)它包含在一段預(yù)處理指令中:     Constuct INITCOMMONCONTROLSEX is decleared in commctrl.h, which is inside mingw\include. Open this header file and search INITCOMMONCONTROLSEX, and the following segment of preprocessed commands will be found:
    1. #if (_WIN32_IE >= 0x0300)
    2. typedef struct tagINITCOMMONCONTROLSEX {
    3.     DWORD dwSize;
    4.     DWORD dwICC;
    5. } INITCOMMONCONTROLSEX,*LPINITCOMMONCONTROLSEX;
    6. #endif
      再查找 _WIN32_IE,找到:     Then search _WIN32_IE and find:
    1. #if 0
    2. #define _WIN32_IE 0x0300
    3. #endif
      #if 0 表示在默認(rèn)情況下,永遠(yuǎn)不會(huì)定義 _WIN32_IE。注釋掉行 1 和行 3,再編譯,仍然出錯(cuò):     #if 0 means _WIN32_IE would never be definded by default. Comment line 1 and line 3, compile and still gets errors:
    1. WinHello.c:8: error: `ICC_STANDARD_CLASSES' undeclared (first use in this function)
    2. WinHello.c:8: error: (Each undeclared identifier is reported only once
    3. WinHello.c:8: error: for each function it appears in.)
      像上面一樣去查找 ICC_STANDARD_CLASSES,這次要把 windef.h 中的 WINVER 改為 0x0501。我覺得不必?fù)?dān)心改了這些會(huì)帶來什么壞處。這些變量存在的意義是定義或不定義一些 API,以便為不同版本的 Windows 開發(fā)程序。如今 Windows Vista 已經(jīng)出來了,世界進(jìn)步很快,有新東西為什么不用呢?     Search ICC_STANDARD_CLASSES as above, and this time modify WINVER in windef.h to 0x0501. I don't think it necessary to warry that these modifications do any thing bad. The purpose of the existance of these variables is to define some APLs or not, for the sake of developing applications for various versions of Windows. Windows Vista has been present, and the world is rapidly progressing, so why not use new things?
      現(xiàn)在編譯運(yùn)行,不會(huì)出錯(cuò)了,但風(fēng)格是 9x/2000 那種老土的,這是因?yàn)槟J(rèn)情況下 NetBeans 不知道如何編譯 rc 文件。解決這一問題的辦法是自定義一個(gè) Makefile。     Compile, run, and no error now, but the style is ugly as 9x/2000's, that's because by default NetBeans dosen't know how to compile rc files. The solution to this peoblem is to write a custom Makefile.
      好像差不多長了,下次繼續(xù)。     This seems long enough and is to be continued next time.

    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 亚洲午夜av影院| 亚洲午夜精品久久久久久人妖| 一区二区3区免费视频| 亚洲AV无码久久精品色欲| 桃子视频在线观看高清免费完整 | 亚洲另类自拍丝袜第1页| 日韩高清免费观看| 免费人成激情视频在线观看冫| 精品亚洲AV无码一区二区三区| 亚洲中文字幕伊人久久无码| 最新黄色免费网站| 一级看片免费视频| 亚洲AV无码乱码在线观看代蜜桃 | 黄网站免费在线观看| 中文字幕在线观看亚洲日韩| 中文字幕一精品亚洲无线一区| 免费精品国产自产拍在线观看图片| 一级毛片大全免费播放| 国产.亚洲.欧洲在线| 亚洲国产精品特色大片观看完整版| 妞干网免费视频在线观看| 久久久久国产精品免费网站| 国产精品亚洲专一区二区三区| 亚洲黄色免费网址| 中文字幕第13亚洲另类| 在线a毛片免费视频观看| 一级毛片免费观看不卡的| 成人嫩草影院免费观看| 亚洲综合激情五月色一区| 亚洲国产综合精品中文第一区| 亚洲A丁香五香天堂网| 最近2019中文字幕mv免费看| 日韩精品免费视频| 午夜在线免费视频| 亚洲爆乳精品无码一区二区| 亚洲日产2021三区在线| 亚洲成AV人片在线观看| 久久精品夜色噜噜亚洲A∨| 国产jizzjizz免费看jizz| 免费观看激色视频网站bd| 可以免费观看的毛片|