hello i am a beginner in using MFC,

i drew a hexagon in mfc using this code: ( a part of the code)

m_StartPoint.x -= int(ceil(r));//50,100

m_EndPoint.y -= int(ceil(h)); //100,99

dc.MoveTo(m_StartPoint);

dc.LineTo(m_EndPoint);

m_EndPoint.y -= int(ceil(s)); //m_Endpoint:100,49

dc.LineTo(m_EndPoint);

m_EndPoint.y -= int(ceil(h));

m_EndPoint.x -= int(ceil(r));

dc.LineTo(m_EndPoint);

m_EndPoint.y += int(ceil(h));

m_EndPoint.x -= int(ceil(r));

dc.LineTo(m_EndPoint);

m_EndPoint.y += int(ceil(s));

dc.LineTo(m_EndPoint);

m_EndPoint.y += int(ceil(h));

m_EndPoint.x += int(ceil(r));

dc.LineTo(m_EndPoint);

and it looks like the picture "hexagon.jpg"

the question is how can i fill it with color, lets say in red? or even more how can i fill it with a small picture instead of coloring it?

Any idea?

thank you

i drew a hexagon in mfc using this code: ( a part of the code)

m_StartPoint.x -= int(ceil(r));//50,100

m_EndPoint.y -= int(ceil(h)); //100,99

dc.MoveTo(m_StartPoint);

dc.LineTo(m_EndPoint);

m_EndPoint.y -= int(ceil(s)); //m_Endpoint:100,49

dc.LineTo(m_EndPoint);

m_EndPoint.y -= int(ceil(h));

m_EndPoint.x -= int(ceil(r));

dc.LineTo(m_EndPoint);

m_EndPoint.y += int(ceil(h));

m_EndPoint.x -= int(ceil(r));

dc.LineTo(m_EndPoint);

m_EndPoint.y += int(ceil(s));

dc.LineTo(m_EndPoint);

m_EndPoint.y += int(ceil(h));

m_EndPoint.x += int(ceil(r));

dc.LineTo(m_EndPoint);

and it looks like the picture "hexagon.jpg"

the question is how can i fill it with color, lets say in red? or even more how can i fill it with a small picture instead of coloring it?

Any idea?

thank you