调试:error C2065: 'OBM_COMBO' : undeclared identifier
为什么提示OBM_COMBO没有定义?请教。LoadOEMBitmap函数的参数OBM_COMBO是VC提供的亚,怎么错了???

解决方案 »

  1.   

    看一下MSDN中这个函数的最后一段说明:
    Note that the constant OEMRESOURCE must be defined before including WINDOWS.H in order to use any of the OBM_ constants.
      

  2.   

    还没解决啊~
    Res
    Bitmap names that begin with OBM_OLD represent bitmaps used by Windows versions prior to 3.0.The constant OEMRESOURCE must be defined before including Windows.h in order to use any of the OBM_ constants.Although Windows CE does not support OEM bitmaps, MFC for Windows CE supports the CBitmap::LoadOEMBitmap method for compatibility with existing code. In Windows CE, this method just calls CBitmap::LoadBitmap.Requirements
      Windows CE versions: 1.0 and later
      Header file: Declared in Afxwin.h
      Platform: H/PC Pro, Palm-size PC, Pocket PC
      

  3.   

    windows.h中是没有OEMRESOURCE常量声明的,所以你自己申明一下吧
      

  4.   

    OBM_COMBO应该是一个常量阿,是LoadOEMBitmap函数的参数,不懂
      

  5.   

    是常量没错,但常量你也必须定义啊。
    估计这段宏是这么定义的:
    #ifdef OEMRESOURCE
    const OBM_COMBO ******
    .......
    #endif
    就是说,必须先有OEMRESOURCE这个宏(或者常量)定义,编译器才会将OBM_COMBO这些常量编译进来,否则是忽略这段常量定义的。
      

  6.   

    OBM_COMBO在winuser.h已经定义过啊,为什么提示没有定义???