sabareesh 0 Newbie Poster

DrawText with specified Color and Font

For that what property i want to use in DrawText Methord?

// 
         // pDC Client device

         	GetClientRect(&rcPoint);

	//// create the font
	VERIFY(fntNew.CreateFontIndirect(&lfFont));

	// create font
	CFont* fntOld = pDC->SelectObject(&fntNew);

	// set text color
	pDC->SetTextColor(clrNew);

	// for display text
    pDC->DrawText(strText, strText.GetLength(), &rcPoint,0 );

	// delete font
	fntOld->DeleteObject();
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.