MCPcopy Create free account
hub / github.com/cinience/RedisStudio / DrawText

Method DrawText

DuiLib/Core/UIRender.cpp:1207–1216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1205}
1206
1207void CRenderEngine::DrawText(HDC hDC, CPaintManagerUI* pManager, RECT& rc, LPCTSTR pstrText, DWORD dwTextColor, int iFont, UINT uStyle)
1208{
1209 ASSERT(::GetObjectType(hDC)==OBJ_DC || ::GetObjectType(hDC)==OBJ_MEMDC);
1210 if( pstrText == NULL || pManager == NULL ) return;
1211 ::SetBkMode(hDC, TRANSPARENT);
1212 ::SetTextColor(hDC, RGB(GetBValue(dwTextColor), GetGValue(dwTextColor), GetRValue(dwTextColor)));
1213 HFONT hOldFont = (HFONT)::SelectObject(hDC, pManager->GetFont(iFont));
1214 ::DrawText(hDC, pstrText, -1, &rc, uStyle | DT_NOPREFIX);
1215 ::SelectObject(hDC, hOldFont);
1216}
1217
1218void CRenderEngine::DrawHtmlText(HDC hDC, CPaintManagerUI* pManager, RECT& rc, LPCTSTR pstrText, DWORD dwTextColor, RECT* prcLinks, CDuiString* sLinks, int& nLinkRects, UINT uStyle)
1219{

Callers

nothing calls this directly

Calls 1

GetFontMethod · 0.45

Tested by

no test coverage detected