Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDC::SetBkMode Doesn' t work In CWnd

Status
Not open for further replies.

kvant13

Programmer
Jul 9, 2003
12
GE
In CWnd::OnCreate() I call SetSetBkMode() for CDC object
But It doesn't work
My Code is


int CMapObject::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CWnd::OnCreate(lpCreateStruct) == -1)
return -1;
//..........
//..........

CClientDC dc(this); //Device context
int res = dc.TextOut(0,0,L"123");
CFont font;
font.CreatePointFont(100,L"Tahoma");
dc.SetBkMode(TRANSPARENT); //Transp bk

dc.BeginPath();
dc.RoundRect(5,5,rect.Width(),20,0,0);
res = dc.TextOut(5,5,L"123");
dc.EndPath();

tObject.CreateFromPath(&dc); //Creates region
// tObject is CRgn
//.................
//...............
} I use Visual C++ 6.0

Please Help

Thanks;


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top