Click here to Skip to main content
15,907,913 members

Comments by shizhanbiao (Top 10 by date)

shizhanbiao 25-Mar-13 23:14pm View    
I want this aspect of the information
shizhanbiao 21-Feb-13 2:06am View    
newLine
shizhanbiao 21-Feb-13 2:05am View    
void TextMiult::DrawItem(LPDRAWITEMSTRUCT lp)
{
CDC *pDC=CDC::FromHandle(lp->hDC);
CRect rc;
GetClientRect(&rc);
CFont font;
font.CreatePointFont(90,"Arial Unicode MS");
pDC->SetBkMode(TRANSPARENT);
//pDC->SelectObject(font);//½«ËûÑ¡Ôñµ½É豸ÖÐ
pDC->SetTextColor(RGB(255,255,255));
CString str;
GetWindowText(str);
CRect boundary(0,0,40,20);
//
CRect rect;
rect.left = rect.top = 0;
rect.right = 200;
rect.bottom = rc.bottom;
//rect(0,0,boundary.Width(),boundary.Height());

int height=pDC->DrawText(str,rc,DT_CALCRECT|DT_CENTER|DT_EDITCONTROL|DT_WORDBREAK);
rect=boundary;
if (boundary.Height()>height)
{
rc.top+=(boundary.Height()-height)/2;
}
pDC->DrawText(str,rc,DT_CENTER|DT_EDITCONTROL|DT_WORDBREAK);
}


no words how to wrap?
shizhanbiao 23-Jan-13 0:11am View    
listcontrol mfc
each insert a line of data later,behing show a delete small icon
shizhanbiao 23-Jan-13 0:11am View    
listcontrol mfc
each insert a line of data later,behing show a delete small icon