回 帖 发 新 帖 刷新版面

主题:关于MASM32中绘制文本的问题

我只知道怎样把文本绘制成单行显示、水平居中、垂直居中几种形式,怎样才能把它写在窗口任意位置上啊?
谢谢关注,谢谢回复!

回复列表 (共1个回复)

沙发

使用TextOut函数可以在指定的位置输出文本:
The TextOut function writes a character string at the specified location, using the currently selected font, background color, and text color.

BOOL TextOut(
  HDC hdc,           // handle to DC
  int nXStart,       // x-coordinate of starting position
  int nYStart,       // y-coordinate of starting position
  LPCTSTR lpString,  // character string
  int cbString       // number of characters
);

我来回复

您尚未登录,请登录后再回复。点此登录或注册