调用SetTextJustification函数 - win32程序

时间:2013-01-01 10:00:33

标签: c++ winapi

有人可以向我解释为什么这段代码不起作用吗?

PAINTSTRUCT ps;
HDC hdc;
TCHAR str[] = _T("An example of SetTextJustification function");

消息循环中的代码:

case WM_PAINT: 
    hdc = BeginPaint(hWnd, &ps);

    if(!SetTextJustification(hdc, 40, 4));
    {
        MessageBox(NULL, _T("Call to SetTextJustification failed!"), _T("Error"), NULL);
    }

    TextOut(hdc, 20, 20, str, _tcslen(str));

    EndPaint(hWnd, &ps);

0 个答案:

没有答案