谢谢了!

解决方案 »

  1.   

    int GetTextCharset(
      HDC hdc,  // handle to DC
    );你有一个DC然后用这个函数就能知道这个DC中使用的FONT的CHARSET是什么
    Return Values
    If the function succeeds, the return value identifies the character set of the font that is currently selected into the specified device context. The following character-set identifiers are defined:ANSI_CHARSET
    BALTIC_CHARSET
    CHINESEBIG5_CHARSET
    DEFAULT_CHARSET
    EASTEUROPE_CHARSET
    GB2312_CHARSET
    GREEK_CHARSETHANGUL_CHARSET
    MAC_CHARSET
    OEM_CHARSET
    RUSSIAN_CHARSET
    SHIFTJIS_CHARSET
    SYMBOL_CHARSET
    TURKISH_CHARSET
    VIETNAMESE_CHARSETKorean language edition of Windows:
    JOHAB_CHARSETMiddle East language edition of Windows:
    ARABIC_CHARSET
    HEBREW_CHARSETThai language edition of Windows:
    THAI_CHARSETIf the function fails, the return value is DEFAULT_CHARSET.你想要做什么?
      

  2.   

    http://www.pcdog.com/p/html/2004715/15720042746_1.htm
      

  3.   

    dc怎么来的?也就是传入这个函数的参数是什么?是通过CreateFont来的?还是通过GetDC来的?
      

  4.   

    HDC dc=::GetDC(this->m_hWnd);
      

  5.   

    http://dev.csdn.net/develop/article/20/20362.shtmDC是根据你的需要而定。比如当前窗口的DC就可以GetDC,或者用OnPaint中的DC;也可以是内存DC,那就看你是怎么建的了。显式文字的时候是跟DC的设置有关的,所以你应该明确取的那个DC上的字符集信息。
      

  6.   

    我在VB中创建了一个窗体,上面放了一个textbox和一个button。但是在按下button后GetTextCharset(GetDC(textbox.hWnd))后,返回的值不对啊,返回的是134。