bonjour,
j'ai un petit soucis au niveau de la gestion de la transparence en C++ a l'aide de GDI+.
j'arrive a gerer un peu la transparence mais des points sont apparu, est qui rend le tracer peu joli....
On m'a conseillé de tester la fonction UpdateLayeredWindow mais je n'arrive pas a le configurer normalement....
le Code de ma fonction:
[spoiler]
CDC* pDC;
pDC = GetDC();
Graphics g(pDC->m_hDC);
Pen pen(Color(50,128,128,128),20);
Pen clean(Color(0,255,255,255),20);
//tracage du CDC
if(m_PointOn == true)
{
if(Dlg->m_Trace == true)
{
if(m_Position.x != point.x || m_Position.y != point.y)
{
pen.SetStartCap(LineCapRound);
pen.SetEndCap(LineCapRound);
Dlg->UpdateLayeredWindow(pDC,NULL,NULL,NULL,NULL,0xff000000,NULL,ULW_COLORKEY);
//Lisse les tracer g.SetSmoothingMode(SmoothingModeHighQuality);
//trace la droite g.DrawLine(&pen,m_Position.x,m_Position.y, point.x, point.y);
}
}
[/spoiler]