COLORREF    oldTextColor, oldBgColor;

RECT        rcText = { 0 };

SIZE        textSize = { 0 };

rcText.left = (int)(35*nWidth/1024);

LOGFONT logfont;

HFONT font,oldfont;

memset(&logfont, 0, sizeof(LOGFONT));

logfont.lfHeight = 40;

logfont.lfWidth  = 25;

logfont.lfWeight = FW_MEDIUM ;font=CreateFontIndirect( &logfont ); 

oldfont = (HFONT)SelectObject(hdcBuf,font);

oldBgColor = SetBkColor( hdcBuf, cBkColor );

oldTextColor = SetTextColor( hdcBuf, RGB( 0, 0, 0 )); 

SetBkMode(hdcBuf,TRANSPARENT);//背景模式为透明

DrawText( ....................................................................);

SetBkMode(hdcBuf,OPAQUE);
SetBkColor( hdcBuf, oldBgColor );
SetTextColor( hdcBuf, oldTextColor );
SelectObject( hdcBuf, oldfont ); 
DeleteObject( font );