why does TextOut() output garbage RRS feed

  • 问题

  • TCHAR szTmp[256];



    TextOutW(hdc,0,40,szTmp,lstrlen(szTmp) );

    why does it print garbage,i know typeid(WNDCLASS).name() is const char*,but how to output normal words in unicode?

    IDE:vs2010,project charset:unicode

    ;by the way,if i know a handle of a winform,may a get the class's typename?

    2011年7月26日 7:50


  • Post repeat.

    You could use CString type object.

    CString str(typeid(xx).name());
    TextOut(hdc, 0, 40, str, str.GetLength());
    Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.
    • 已标记为答案 Rob Pan 2011年8月1日 8:21
    2011年7月26日 7:57