@ovidiucucu : Thankyou very much. Sorry i missed the above post.
Btw, I had my drawtext working with the following code:
Now this works ok. But the font is too big. Could MFC gurus help me, with these please ? Thankyou very much in advanceCode:void EmfCellListRend::DrawRectangle(EmfCellListRendDrawingParams* pParams, TDC& dc, CEmfCellList *pCelllist) { ILogicalLayerManager& rLogLayManager = DataManager::GetInstance().GetLogicalLayer(); tstring message = _T("EMF Cell list"); for (int i = 0; i < (int)pParams->GetNumCovCells(); i++) { const MultiTechCell* pObjCell((const MultiTechCell*)rLogLayManager.Find(OT_MULTI_TECH_CELL, pCelllist[i].m_CellKey)); tstring sNewLine = _T("\n"); TgNetType eTechType = pObjCell->GetActiveTechnologyMode(); CString strTechType = MAIN_NET_TYPE_STRINGS_SWITCH( eTechType ); std::string std(strTechType, strTechType.GetLength()); tstring sTechtype = _T(std); tstring sCellId = _T(pObjCell->GetID()); tstring sEmf = _T(std::to_string(pCelllist[i].m_dCellEMF_Vm)); message +=sNewLine+sTechtype+" "+sCellId+" "+sEmf; } HWND hwnd = WindowFromDC(dc); RECT rc={ 0, 0, 200, 0 }; UINT format = DT_LEFT | DT_TOP | DT_EDITCONTROL | DT_WORDBREAK; DrawText(dc, message.c_str(), -1, &rc, format | DT_CALCRECT); DrawText(dc, message.c_str(), -1, &rc, format); DeleteDC(dc); dc.RestorePen(); }




Reply With Quote
