GetFontUnicodeRanges这个函数VC知识吗?
有什么用呀?我在VC里怎么没办法用呀。
我想得到每个字体的unicode范围用它行吗?

解决方案 »

  1.   

    你可能没有加相应的头文件和库文件哦
    GetFontUnicodeRanges
    The GetFontUnicodeRanges function returns information about which Unicode characters are supported by a font. The information is returned as a GLYPHSET structure.DWORD GetFontUnicodeRanges(
      HDC hdc,         // handle to DC
      LPGLYPHSET lpgs  // glyph set
    );
    Parameters
    hdc 
    [in] Handle to the device context. 
    lpgs 
    [out] Pointer to a GLYPHSET structure that receives the glyph set information. If this parameter is NULL, the function returns the size of the GLYPHSET structure required to store the information. 
    Return Values
    If the function succeeds, it returns number of bytes written to the GLYPHSET structure or, if the lpgs parameter is NULL, it returns the size of the GLYPHSET structure required to store the information.If the function fails, it returns zero. No extended error information is available. Requirements 
      Windows NT/2000/XP: Included in Windows 2000 and later.
      Windows 95/98/Me: Unsupported.
      Header: Declared in Wingdi.h; include Windows.h.
      Library: Use Gdi32.lib.
      

  2.   

    我加上头文件 #include "Wingdi.h"用它:  GLYPHSET  *lpgs;还是提示错误:E:\VC\XEditor\SymbolDialog.cpp(552) : error C2065: 'GLYPHSET' : undeclared identifier
      

  3.   

    如果实在是编译通不过的,那么你就在你的代码里面把下面的加进去吧
    typedef struct tagGLYPHSET {
      DWORD    cbThis;
      DWORD    flAccel;
      DWORD    cGlyphsSupported;
      DWORD    cRanges;
      WCRANGE  ranges[1];
    } GLYPHSET, *PGLYPHSET;对了,使用那个可得注意了,请看:
      Windows NT/2000/XP: Included in Windows 2000 and later.
      Windows 95/98/Me: Unsupported.
      Header: Declared in Wingdi.h; include Windows.h.
      Library: Use Gdi32.lib.