• 神奇的CommCtrl.h


    CommCtrl.h这玩意明明需要windows.h里面的定义,但是自己居然不include。

    也就是说,如果你这样写,会报错。必须得把顺序弄好,先include windows.h。

    #include <CommCtrl.h>
    #include <windows.h>
    E:01Microsoft (R) Developer StudioVC98INCLUDECommCtrl.h(26) : error C2061: syntax error : identifier 'HRESULT'
    E:01Microsoft (R) Developer StudioVC98INCLUDECommCtrl.h(26) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(81) : error C2143: syntax error : missing '{' before '*'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(88) : error C2146: syntax error : missing ')' before identifier 'FAR'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(88) : error C2061: syntax error : identifier 'FAR'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(88) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(88) : error C2059: syntax error : ')'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(88) : error C2146: syntax error : missing ')' before identifier 'hwnd'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(88) : error C2061: syntax error : identifier 'hwnd'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(88) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(88) : error C2059: syntax error : ','
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(88) : error C2059: syntax error : ')'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(89) : error C2146: syntax error : missing ')' before identifier 'FAR'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(89) : error C2061: syntax error : identifier 'FAR'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(89) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(89) : error C2059: syntax error : ')'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(89) : error C2146: syntax error : missing ')' before identifier 'hwnd'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(89) : error C2061: syntax error : identifier 'hwnd'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(89) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(89) : error C2059: syntax error : ','
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(89) : error C2059: syntax error : ')'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(125) : error C2061: syntax error : identifier 'DWORD'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(126) : error C2061: syntax error : identifier 'dwFlags'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(126) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(127) : error C2061: syntax error : identifier 'hInstance'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(127) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(129) : error C2061: syntax error : identifier 'LPCSTR'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(131) : error C2061: syntax error : identifier 'pResource'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(131) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(135) : error C2059: syntax error : '}'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(137) : error C2061: syntax error : identifier 'HICON'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(138) : error C2061: syntax error : identifier 'pszIcon'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(138) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(139) : error C2059: syntax error : '}'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(140) : error C2061: syntax error : identifier 'pszTitle'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(140) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(141) : error C2061: syntax error : identifier 'pfnDlgProc'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(141) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(142) : error C2061: syntax error : identifier 'lParam'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(142) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(143) : error C2061: syntax error : identifier 'pfnCallback'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(143) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(144) : error C2061: syntax error : identifier 'FAR'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(144) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(147) : error C2061: syntax error : identifier 'pszHeaderTitle'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(147) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(148) : error C2061: syntax error : identifier 'pszHeaderSubTitle'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(148) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(150) : error C2059: syntax error : '}'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(151) : error C2061: syntax error : identifier 'FAR'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(151) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(154) : error C2061: syntax error : identifier 'DWORD'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(155) : error C2061: syntax error : identifier 'dwFlags'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(155) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(156) : error C2061: syntax error : identifier 'hInstance'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(156) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(158) : error C2061: syntax error : identifier 'LPCWSTR'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(160) : error C2061: syntax error : identifier 'pResource'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(160) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(164) : error C2059: syntax error : '}'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(166) : error C2061: syntax error : identifier 'HICON'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(167) : error C2061: syntax error : identifier 'pszIcon'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(167) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(168) : error C2059: syntax error : '}'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(169) : error C2061: syntax error : identifier 'pszTitle'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(169) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(170) : error C2061: syntax error : identifier 'pfnDlgProc'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(170) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(171) : error C2061: syntax error : identifier 'lParam'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(171) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(172) : error C2061: syntax error : identifier 'pfnCallback'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(172) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(173) : error C2061: syntax error : identifier 'FAR'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(173) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(176) : error C2061: syntax error : identifier 'pszHeaderTitle'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(176) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(177) : error C2061: syntax error : identifier 'pszHeaderSubTitle'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(177) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(179) : error C2059: syntax error : '}'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(180) : error C2061: syntax error : identifier 'FAR'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(180) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(225) : error C2143: syntax error : missing ')' before '*'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(225) : error C2143: syntax error : missing '{' before '*'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(225) : error C2059: syntax error : ')'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(231) : error C2061: syntax error : identifier 'DWORD'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(232) : error C2061: syntax error : identifier 'dwFlags'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(232) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(233) : error C2061: syntax error : identifier 'hwndParent'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(233) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(234) : error C2061: syntax error : identifier 'hInstance'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(234) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(236) : error C2061: syntax error : identifier 'HICON'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(237) : error C2061: syntax error : identifier 'pszIcon'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(237) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(238) : error C2059: syntax error : '}'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(239) : error C2061: syntax error : identifier 'pszCaption'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(239) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(241) : error C2061: syntax error : identifier 'nPages'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(241) : error C2059: syntax error : ';'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(243) : error C2061: syntax error : identifier 'UINT'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(244) : error C2061: syntax error : identifier 'pStartPage'
    E:01Microsoft (R) Developer StudioVC98INCLUDEprsht.h(244) : fatal error C1003: error count exceeds 100; stopping compilation

    哈哈哈,太搞笑了。明明自己需要但是为什么不include呢?

    可能是当时的C语言编译器比较自由,这些标志符缺了不影响编译。

  • 相关阅读:
    shell变量解析
    visual studio code(vscode)使用
    linux虚拟机安装
    算法总结系列之八:复读机的故事散列表及其在.NET中的应用浅析(上集)
    对改善Dictionary时间性能的思考及一个线程安全的Dictionary实现
    算法总结系列之八:复读机的故事 散列表.NET应用的研究(下集)
    使用WiX打包你的应用程序之二向WiX脚本传递信息(属性)的几种方式
    当心Dictionary带来的一种隐式内存泄漏
    从DWG到XAML (II) DWFx格式解析及其和XPS的关系
    从DWG到XAML (I) 浅谈DWG历史,现状及方向
  • 原文地址:https://www.cnblogs.com/ageane/p/commctrl.html
Copyright © 2020-2023  润新知