'board-none'에 해당되는 글 1건

  1. 2007/09/01 vc++ 다이얼로그 board-none 리사이징하기
UINT CBoayoDlg::OnNcHitTest(CPoint point)
{
    // TODO: Add your message handler code here and/or call default

    RECT rc;
    GetWindowRect(&rc);

    long x, y;

    x = point.x;// + rc.left;
    y = point.y;// + rc.top;


    if((rc.top <= y) && (y <= rc.top+10))
    {
        if((rc.left <= x) && (x <= rc.left+10))
        {
            return HTTOPLEFT;
        }

        if((rc.right >= x) && (x >= rc.right-10))
        {
            return HTTOPRIGHT;
        }

        return HTTOP;
    }

    if((rc.bottom >= y) && (y >= rc.bottom-10))
    {
        if((rc.left <= x) && (x <= rc.left+10))
        {
            return HTBOTTOMLEFT;
        }

        if((rc.right >= x) && (x >= rc.right-10))
        {
            return HTBOTTOMRIGHT;
        }

        return HTBOTTOM;
    }

    if((rc.left <= x) && (x <= rc.left+10))
    {
        if((rc.top <= y) && (y <= rc.top+10))
        {
            return HTTOPLEFT;
        }
        if((rc.bottom >= y) && (y >= rc.bottom-10))
        {
            return HTBOTTOMLEFT;
        }

        return HTLEFT;
    }

    if((rc.right >= x) && (x >= rc.right-10))
    {
        if((rc.top <= y) && (y <= rc.top+10))
        {
            return HTTOPRIGHT;
        }
        if((rc.bottom >= y) && (y >= rc.bottom-10))
        {
            return HTBOTTOMRIGHT;
        }

        return HTRIGHT;
    }   
   
    return CDialog::OnNcHitTest(point);
}
2007/09/01 22:19 2007/09/01 22:19