本文整理汇总了C++中CChildFrame::MoveWindow方法的典型用法代码示例。如果您正苦于以下问题:C++ CChildFrame::MoveWindow方法的具体用法?C++ CChildFrame::MoveWindow怎么用?C++ CChildFrame::MoveWindow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CChildFrame
的用法示例。
在下文中一共展示了CChildFrame::MoveWindow方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnFileScan
//////////////////////////////TWAIN Specific////////////////////////////////////////
void CFPAnalysisView::OnFileScan()
{
CFPAnalysisDoc* pDoc = GetDocument();
CScanDlg dlg;
if (dlg.DoModal() == IDOK)
{
currentimage.SetFilename(dlg.m_szImageName);
currentimage.LoadBMP();
Invalidate(FALSE);
pDoc->SetTitle(dlg.m_szImageName);
}
//set the size of view to image-size...
CChildFrame* pParent =(CChildFrame*)GetParentFrame();
CRect rcParent;
rcParent.left = 0;
rcParent.top =0;
rcParent.right = (int)currentimage.GetWidth();
rcParent.bottom = (int)currentimage.GetHeight();
pParent->MoveWindow(&rcParent);
SetFPScrollInfo();
// Refresh the entire view...
Invalidate(TRUE);
}
示例2: OnDropFiles
/////////////////////// Drag & Drop support //////////////////
void CFPAnalysisView::OnDropFiles(HDROP hDropInfo)
{
CFPAnalysisDoc* pDoc = GetDocument();
WORD dwFiles;
char lpszFile[80];
//Drop only one file at a time, so if more than one file has been dropped, the
//action is disallowed.
dwFiles = ::DragQueryFile(hDropInfo,0xFFFFFFFF,(LPTSTR)NULL,0);
if (dwFiles > 1)
return;
//Handle one file at a time
// Get the name of the file dropped...
::DragQueryFile(hDropInfo,0,lpszFile,sizeof(lpszFile));
//DEBUG
AfxMessageBox(lpszFile);
//Be sure that file is BMP file
if (strstr(lpszFile,".BMP"))
{
currentimage.SetFilename(lpszFile);
currentimage.LoadBMP();
Invalidate(FALSE);
pDoc->SetTitle(lpszFile);
}
else
AfxMessageBox("Incorrect File Type.", MB_ICONSTOP);
//set the size of view to image-size...
CChildFrame* pParent =(CChildFrame*)GetParentFrame();
CRect rcParent;
rcParent.left = 0;
rcParent.top =0;
rcParent.right = (int)currentimage.GetWidth();
rcParent.bottom = (int)currentimage.GetHeight();
pParent->MoveWindow(&rcParent);
//initialize zoom-specific members
m_nNum = m_nDen = 1;
SetFPScrollInfo();
// Refresh the entire view...
Invalidate(TRUE);
//Call base class's implementation
CScrollView::OnDropFiles(hDropInfo);
}
示例3: OnFileOpen
void CFPAnalysisView::OnFileOpen()
{
CFPAnalysisDoc* pDoc = GetDocument();
CString sFilename;
CString sFilt="BMP (*.bmp)|*.bmp|All files (*.*)|*.*||";
CFileDialog dlg(
TRUE, // Create an open file dialog
"*.BMP", // Default file extension
NULL, // Filename
OFN_HIDEREADONLY | // Flags - don't show the read only check box)
OFN_FILEMUSTEXIST, // - make sure file exists
sFilt); // the file filter
dlg.m_ofn.lpstrTitle = "Choose The Fingerprint Bitmap..."; //set the title
if (dlg.DoModal()==IDOK)
{
sFilename = dlg.GetPathName();
CString sExt = dlg.GetFileExt();
CString sFilenameShort= dlg.GetFileName();
if (!sExt.CompareNoCase("BMP"))
{
currentimage.SetFilename(sFilename);
currentimage.LoadBMP();
Invalidate(FALSE);
pDoc->SetTitle(sFilenameShort);
}
else
AfxMessageBox("Incorrect File Type.", MB_ICONSTOP);
}
//set the size of view to image-size...
CChildFrame* pParent =(CChildFrame*)GetParentFrame();
CRect rcParent;
rcParent.left = 0;
rcParent.top =0;
rcParent.right = (int)currentimage.GetWidth();
rcParent.bottom = (int)currentimage.GetHeight();
pParent->MoveWindow(&rcParent);
//initialize zoom-specific members
m_nNum = m_nDen = 1;
SetFPScrollInfo();
// Refresh the entire view...
Invalidate(TRUE);
}
示例4: OnWindowTogglemax
void CMainFrame::OnWindowTogglemax()
{
BOOL bIfMaximized;
CChildFrame *pActiveWnd = (CChildFrame *) MDIGetActive( &bIfMaximized);
if( bIfMaximized)
{
MDIRestore( pActiveWnd);
if( !pActiveWnd->m_bAllreadyUnmaximized)
{
pActiveWnd->MoveWindow( 0, 0, 256, 256);
RECT rectClient;
pActiveWnd->GetClientRect( &rectClient);
PIX pixRightWidth = 256+256-rectClient.right+4;
PIX pixRightHeight = 256+256-rectClient.bottom+4;
pActiveWnd->MoveWindow( 0, 0, pixRightWidth, pixRightHeight);
pActiveWnd->m_bAllreadyUnmaximized = TRUE;
}
}
else
{
MDIMaximize( pActiveWnd);
}
theApp.m_chGlobal.MarkChanged();
}