问题描述
voidCWordCombox::DrawItem(LPDRAWITEMSTRUCTlpDIS){ASSERT(lpDIS->CtlType==ODT_COMBOBOX);CStringcsCurFontName;CStringCompare;GetLBText(lpDIS->itemID,csCurFontName);Compare=csCurFontName.Left(1);intCompareResult=Compare.Compare(_T("@"));//if(CompareResult!=0)//{CRectrc=lpDIS->rcItem;m_Rectmeun=rc;CDCdc;dc.Attach(lpDIS->hDC);if(lpDIS->itemState&ODS_FOCUS){dc.DrawFocusRect(&rc);m_RecentFontID.Add(lpDIS->itemID);}if(lpDIS->itemID==-1)return;intnIndexDC=dc.SaveDC();CBrushbr;//COLORREFclrSample=m_clrSample;if(lpDIS->itemState&ODS_SELECTED){//br.CreateSolidBrush(::GetSysColor(COLOR_HIGHLIGHT));br.CreateSolidBrush(RGB(255,0,255));//dc.SetTextColor(::GetSysColor(COLOR_HIGHLIGHTTEXT));dc.SetTextColor(RGB(0,20,255));//clrSample=::GetSysColor(COLOR_HIGHLIGHTTEXT);//m_itemID.Add(lpDIS->itemID);}else{//br.CreateSolidBrush(dc.GetBkColor());br.CreateSolidBrush(RGB(99,83,242));}dc.SetBkMode(TRANSPARENT);dc.FillRect(&rc,&br);//m_RecentFont.Add(csCurFontName);DWORDdwData=GetItemData(lpDIS->itemID);//if(dwData==TRUETYPE_FONTTYPE)if(dwData&&TRUETYPE_FONTTYPE){m_img.Draw(&dc,0,CPoint(rc.left+5,rc.top+4),ILD_TRANSPARENT);}rc.left+=GLYPH_WIDTH;intiOffsetX=SPACING;CFontcf;if(m_style==NAME_ONLY){if(!cf.CreateFont(m_iFontHeight,0,0,0,FW_NORMAL,FALSE,FALSE,FALSE,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,ANTIALIASED_QUALITY,DEFAULT_PITCH,csCurFontName)){ASSERT(0);return;}}CSizesz;intiPosY=0;HFONThf=NULL;switch(m_style){caseNAME_ONLY:{hf=(HFONT)dc.SelectObject(cf);sz=dc.GetTextExtent(csCurFontName);iPosY=(rc.Height()-sz.cy)/2;SetItemHeight(lpDIS->itemID,340);dc.TextOutW(rc.left+iOffsetX,rc.top+iPosY,csCurFontName);dc.SelectObject(hf);}break;}dc.RestoreDC(nIndexDC);dc.Detach();//}//lpDIS->itemID-=m_ModifyID;//m_ModifyID++;}在这函数里面为什么lpDIS->ItemID总是为1;
解决方案
解决方案二:
路过帮顶=============11月6日,论坛升级公告,积分已经做了调整!http://topic.csdn.net/u/20081107/11/b27dc75f-14b1-4594-9de3-5b18d9e36a11.html此次调整增加了两个新的可用分获取渠道:1:帖子被推荐(加精)后,帖主可以获得88分的可用分奖励;2:帖子结帖后会返还帖主50%的悬赏分,无满意结帖不返还分数;3:接下来会不断增加新的可用分获取途径,比如参与活动赠送等,请大家多关注;