TextOut这个函数应该怎么用
比如说我要输出“hi”应该怎么做

解决方案 »

  1.   

    OnDraw里面
    pDC->TestOut(0,0,“hi”);
      

  2.   

    (x,y)为显示的坐标
    pDC->TextOut(x,y,“hi”);
      

  3.   

    BOOL TextOut(
      HDC hdc,           // handle to device context
      int nXStart,       // x-coordinate of starting position
      int nYStart,       // y-coordinate of starting position
      LPCTSTR lpString,  // pointer to string
      int cbString       // number of characters in string
    );
    virtual BOOL TextOut( int x, int y, LPCTSTR lpszString, int nCount );BOOL TextOut( int x, int y, const CString& str );以上是TextOut的三个原型, 呵呵, 想用那一个API:
    HDC hDC = GetDC(hWnd);
    TextOut(hDC, x, y, "string", strlen("string"));
    ReleaseDC(hDC);
    MFC:
    他们讲了