Исходный код:
Код | void CTmpView::OnDraw(CDC* pDC) { CTmpDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); // TODO: add draw code for native data here UINT angle = 900; LOGFONT lf; (pDC->GetCurrentFont())->GetLogFont(&lf); lf.lfEscapement = angle; lf.lfOutPrecision = OUT_TT_ONLY_PRECIS;
CFont font; font.CreateFontIndirect(&lf);
pDC->SelectObject(&font); CRect rect; GetClientRect ( &rect ); rect.OffsetRect(100, 100); pDC->DrawText(_T("0123456789"), rect, DT_NOCLIP); }
|
Кстати, если разработка под Win2k или WinNT, то можно и так: Исходный код:Код |
void CTmpView::OnDraw(CDC* pDC) { CTmpDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); // TODO: add draw code for native data here UINT angle = 900; LOGFONT lf; (pDC->GetCurrentFont())->GetLogFont(&lf); ::SetGraphicsMode(pDC->m_hDC, GM_ADVANCED); lf.lfEscapement = angle; lf.lfOrientation = 0; lf.lfOutPrecision = OUT_TT_ONLY_PRECIS;
CFont font; font.CreateFontIndirect(&lf);
pDC->SelectObject(&font); CRect rect; GetClientRect ( &rect ); rect.OffsetRect(100, 100); pDC->DrawText(_T("0123456789"), rect, DT_NOCLIP); }
|
|