MFC-IsRectEmpty判断一个矩形是否为空矩形

 

    HDC hdc = ::GetDC(m_hWnd);
    RECT rect = { 10,10,100,100 };
    BOOL b = IsRectEmpty(&rect);
    //返回值:如果矩形为空,则返回值为非零。如果矩形不为空,则返回值为零

    CString str;
    str.Format(_T("b=%d"),b );
    ::OutputDebugString(str);

 

 

 

 

 

 

posted @ 2023-04-16 08:37  天子骄龙  阅读(30)  评论(0)    收藏  举报