//根据路径创建不规则窗体
CDC* pDC;
pDC = this->GetDC();
::BeginPath(pDC->m_hDC);
//设置为透明模式
::SetBkMode(pDC->m_hDC, TRANSPARENT);
//
RECT rect;
this->GetClientRect(&rect);
/*三角型
int TopCenterPoint=rect.left + (rect.right - rect.left) /2;
pDC->MoveTo(TopCenterPoint, rect.top);
pDC->LineTo(rect.left, rect.bottom - GLOBAL_OVERLEN);
pDC->LineTo(rect.right, rect.bottom - GLOBAL_OVERLEN);
pDC->LineTo(TopCenterPoint,rect.top);
*/
/*比较奇怪的矩形
pDC->MoveTo(rect.left, rect.top);
pDC->LineTo(rect.right, rect.top);
pDC->LineTo(rect.right, rect.bottom - GLOBAL_OVERLEN);
pDC->LineTo(rect.left + (rect.right - rect.left) / 2, rect.bottom - GLOBAL_OVERLEN);
pDC->LineTo(rect.left + (rect.right - rect.left) / 2, rect.bottom);
pDC->LineTo(rect.left + (rect.right - rect.left) / 2 - GLOBAL_OVERWIDTH, rect.bottom - GLOBAL_OVERLEN);
pDC->LineTo(rect.left, rect.bottom - GLOBAL_OVERLEN);
pDC->LineTo(rect.left, rect.top);
*/
//
::EndPath(pDC->m_hDC);
hRgn = ::PathToRegion(pDC->m_hDC);
this->SetWindowRgn(hRgn, TRUE);