📄 seqprocessdlgparameters.cpp
字号:
// SeqProcessDlgParameters.cpp : implementation file
//
#include "stdafx.h"
#include "SeqProcess.h"
#include "SeqProcessDlg.h"
#include "FnMath.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
FnMath fMath;
/////////////////////////////////////////////////////////////////////////
//----------------------------------------------------------------------
void CSeqProcessDlg::OnParametersDisplay()
{
m_dlgDisplayParams.m_dispScale = scale;
if (m_dlgDisplayParams.DoModal() == IDCANCEL)
return;
scale = m_dlgDisplayParams.m_dispScale;
SetWindowPos(NULL, NULL, NULL, MINWINDOWWIDTH, MINWINDOWHEIGHT, SWP_NOMOVE);
// Compute the size of the required window area
int widthWindow;
int heightWindow;
widthWindow = xPosWindow + scale * m_width; + 20;
heightWindow = yPosWindow + scale * m_height; + 20 ;
CRect rectC; // Client (display) window
GetClientRect(&rectC);
//Find the amount the client area (hence the parent window area)
//must be increased to cover the image
int wdiff;
int hdiff;
CRect rectW; // Parent window (includes the client window)
GetWindowRect(&rectW);
int rectWwidth;
int rectWheight;
rectWwidth = (rectW.right - rectW.left);
rectWheight = (rectW.bottom - rectW.top);
wdiff = widthWindow - rectC.right;
hdiff = heightWindow - rectC.bottom;
//Increase parent window size to cover the required display area
rectWwidth += (int) fMath.Max(0, wdiff);
rectWheight += (int) fMath.Max(0, hdiff);
SetWindowPos(NULL, NULL, NULL, rectWwidth, rectWheight, SWP_NOMOVE);
CClientDC dc(this);
dc.FillSolidRect( xPosWindow, yPosWindow, rectWwidth, scale*m_height, RGB(192, 192, 192));
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -