15,979
社区成员
发帖
与我相关
我的任务
分享
void CTest1View::OnDraw(CDC* pDC)
{
CTest1Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
pDC->DrawText(str,&rectstr,DT_LEFT |DT_CALCRECT);
pDC->DrawText(str,rectstr,DT_LEFT);
}
void CTest1View::OnFileOpen()
{
// TODO: Add your command handler code here
CFileDialog dlg(TRUE);
if(IDOK==dlg.DoModal())
{
CFile file(dlg.GetFileName(),CFile::modeRead);
DWORD len=file.GetLength();
char *pbuf;
pbuf=new char[len];
pbuf[len]=0;
file.Read(pbuf,len);
file.Close();
str=pbuf;
}
//UpdateWindow();
SetScrollRange (SB_VERT,0,rectstr.bottom );
Invalidate();
}