示例#1
0
void CSketcherView::OnInitialUpdate()
{
	
	ResetScrollSizes(); // Set up the scrollbars
	CScrollView::OnInitialUpdate();

}
示例#2
0
void CZarplataView::OnInitialUpdate()
{
	ResetScrollSizes();
	CScrollView::OnInitialUpdate();
	
	//CSize sizeTotal;
	// TODO: рассчитайте полный размер этого представления
	//sizeTotal.cx = sizeTotal.cy = 100;
	//CSize DocSize(1300, 465); // на пятьдесят листов по длине
	//SetScrollSizes(MM_LOENGLISH, DocSize, CSize(500, 500), CSize(50, 50));
}
示例#3
0
void CSketcherView::OnViewScale()
{
	
	CScaleDialog aDlg; // Create a dialog object
	aDlg.m_Scale = m_Scale - 1; // Pass the view scale to the dialog
	if(aDlg.DoModal() == IDOK)
	{
		m_Scale = 1 + aDlg.m_Scale; // Get the new scale
		ResetScrollSizes(); // Adjust scrolling to the new scale
		InvalidateRect(0); // Invalidate the whole window
	}
	
}
void CSketcherView::OnViewScale()
{
  CScaleDialog aDlg;                   // Create a dialog object
  aDlg.m_Scale = m_Scale;              // Pass the view scale to the dialog
  if(aDlg.DoModal() == IDOK)
  {
    m_Scale = aDlg.m_Scale;            // Get the new scale

    // Get the frame window for this view
    CChildFrame* viewFrame = static_cast<CChildFrame*>(GetParentFrame());

    // Build the message string
    CString StatusMsg("View Scale:");
    StatusMsg += static_cast<char>('0' + m_Scale);

    // Write the string to the status bar
    viewFrame->m_StatusBar.GetStatusBarCtrl().SetText(StatusMsg, 0, 0);

    ResetScrollSizes();                // Adjust scrolling to the new scale
    InvalidateRect(0);                 // Invalidate the whole window 
  }
}