void CHEMView::OnNcPaint()
{
HDC hdc;
hdc = ::GetWindowDC(m_hWnd);
// Paint into this DC
RECT rcWin;
::GetWindowRect(m_hWnd, &rcWin);
OffsetRect( &rcWin, -rcWin.left, -rcWin.top );
HBRUSH hbr = CreateSolidBrush( #000000 ); // black
// top, left, bottom, right, border
for(int i=0; i FrameRect(hdc, &rcWin, hbr);
InflateRect(&rcWin, -1, -1);
}
::ReleaseDC(m_hWnd, hdc);
}
參考資料
全站熱搜