100 if (cxs<0 || cys<0)
return pc;
104 POINT pt = GetWindowSize(pc);
105 pFrame->SetWindowPos((CWnd*)&wndTop, 0, 0, pt.x, pt.y, SWP_NOMOVE);
106 GetClientRect(&clientRect);
109 if (clientRect.right!=pc.x || clientRect.bottom!=pc.y) {
111 double srate = (double)clientRect.bottom/(
double)clientRect.right;
112 if (sizeXYRate<srate) {
113 pc.x = clientRect.right;
114 pc.y = (int)(pc.x*sizeXYRate+0.5);
117 pc.y = clientRect.bottom;
118 pc.x = (int)(pc.y/sizeXYRate+0.5);
125 pt = GetWindowSize(pc);
126 pFrame->SetWindowPos((CWnd*)&wndTop, 0, 0, pt.x, pt.y, SWP_NOMOVE);
127 GetClientRect(&clientRect);
130 pc.x = prevXSize = clientRect.right;
131 pc.y = prevYSize = clientRect.bottom;
132 clientRate = (double)clientRect.right/(
double)origXSize;
135 initXSize = clientRect.right;
136 initYSize = clientRect.bottom;
virtual void OnActivateView(BOOL bActivate, CScrollView *pActivateView, CScrollView *pDeactiveView)
virtual void OnDraw(CDC *pDC)
virtual void OnInitialUpdate()
POINT ExecWindowReSize(int xs, int ys)
POINT GetWindowReSize(POINT pt)
afx_msg void OnSize(UINT nType, int cx, int cy)
POINT GetWindowSize(POINT pt)
void SetTitle(LPCTSTR title)
POINT GetClientSize(POINT pt)
POINT SetWindowSize(int xs, int ys, BOOL first=TRUE)
afx_msg BOOL OnEraseBkgnd(CDC *pDC)