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

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

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

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

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

Troubleshooting
Research
Professional Opinions
Ask a Question
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

Avatar of alexatsearidge
alexatsearidgeFlag for Canada asked on
C++Photos / Graphics SoftwareProgramming Theory
3 Comments1 Solution1978 ViewsLast Modified:
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 ));
}
ASKER CERTIFIED SOLUTION
Avatar of alexatsearidge
alexatsearidgeFlag of Canada imageChief Architect

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answers