int CTmpxView::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;

// TODO: Add your specialized creation code here
CRect rect;
this->GetWindowRect(&rect);
return 0;
}
这样好像不行,

解决方案 »

  1.   

    CRect rect;
    GetClientRect(rect);
      

  2.   

    typedef struct tagCREATESTRUCT {
       LPVOID    lpCreateParams;
       HANDLE    hInstance;
       HMENU     hMenu;
       HWND      hwndParent;
       int       cy;
       int       cx;
       int       y;
       int       x;
       LONG      style;
       LPCSTR    lpszName;
       LPCSTR    lpszClass;
       DWORD     dwExStyle;
    } CREATESTRUCT;