怎么样得到客户区的大小啊,还是怎么把这个整型的数学输出啊,谁能告诉我一个完整的程序吗??

解决方案 »

  1.   

    得到客户区的大小
    RECT rect;
    GetClientRect(&rect);
    还是怎么把这个整型的数学输出啊?
    --数学输出到哪儿?

    CString s;
    s.Format("%d,%d,%d,%d",rect.left,rect.right,rect.top,rect.bottom);
    MessageBox(s);
      

  2.   

    void CTest7View::OnDraw(CDC* pDC)
    {
    CTest7Doc* pDoc = GetDocument();
    ASSERT_VALID(pDoc); CRect rect;
    GetClientRect(&rect);//get the client rect size
    CString str;
    str.Format("Left %d  Top %d  Right %d Bottom %d ",rect.left,rect.top,rect.right,rect.bottom);
    pDC->TextOut(100,100,str);
    // TODO: add draw code for native data here
    }
      

  3.   

    int   cxScreen = GetSystemMetrics(SM_CXSCREEN);
       int cyScreen = GetSystemMetrics(SM_CYSCREEN);
       上边也可以得到 我还不知道怎么给分?是不是给分的时候就一定要把分给完啊??
     你点击管理,输入密码就可以给分结帖了,20是要给完的!