###### Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

Deciding to stick with EE.

Mohamed Asif

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
###### Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

# drawing a partially transparent brush or region

C++Photos / Graphics SoftwareProgramming Theory
Currently I am drawing a solid triangle with the following code onto a bitmap.  I need a way to make the triangle partially transparent.  Not sure weather I can do some sort of an alphablend, or use a differnet brush or apply something to the region or rectangle.  Following is my code:
``````void CIMD_Radar_Map_Dlg::DrawCameraArea()
{
CRgn   rgnA;

CPoint ptVertex[5];

ptVertex[0].x = m_cam_triangle_X1;
ptVertex[0].y = m_cam_triangle_Y1;
ptVertex[1].x = m_cam_triangle_X2;
ptVertex[1].y = m_cam_triangle_Y2;
ptVertex[2].x = m_cam_triangle_X3;
ptVertex[2].y = m_cam_triangle_Y3;

VERIFY(rgnA.CreatePolygonRgn( ptVertex, 3, ALTERNATE));

CRect rectRgnBox;
int nRgnBoxResult = rgnA.GetRgnBox( &rectRgnBox );
ASSERT( nRgnBoxResult != ERROR || nRgnBoxResult != NULLREGION );

CBrush brA;
VERIFY(brA.CreateSolidBrush( RGB(115, 125, 50) ));  // rgnA Red
VERIFY(m_tempDC.FrameRgn( &rgnA, &brA, 100, 100 ));
}
``````