VERSION.CPP
上传用户:zhang8947
上传日期:2007-01-08
资源大小:1910k
文件大小:2k
- // version.cpp : implementation file
- //
- #include "stdafx.h"
- #include "resource.h"
- #include "version.h"
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CVersion dialog
- CVersion::CVersion(UINT nIDTemplate,CWnd* pParent /*=NULL*/)
- : CDialog(nIDTemplate, pParent)
- {
- //{{AFX_DATA_INIT(CVersion)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
- void CVersion::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CVersion)
- // NOTE: the ClassWizard will add DDX and DDV calls here
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CVersion, CDialog)
- //{{AFX_MSG_MAP(CVersion)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CVersion message handlers
- BOOL CVersion::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- // TODO: Add extra initialization here
- //改变对话框的显示位置
- RECT Rect ;
- GetWindowRect( &Rect ) ; //得到原来对话框的位置
- int nWidth =Rect.right-Rect.left+1 ;
- int nHeight=Rect.bottom-Rect.top+1 ;
- RECT screenRect ;
- //得到屏幕大小
- GetDesktopWindow()->GetWindowRect( &screenRect ) ;
- //计算sheet的新位置
- Rect.left =(screenRect.right-nWidth)/2 ;
- Rect.top =(screenRect.bottom-nHeight)/2 ;
- Rect.right =Rect.left+nWidth-1 ;
- Rect.bottom =Rect.top+nHeight-1 ;
- MoveWindow( &Rect ) ;
-
- return TRUE; // return TRUE unless you set the focus to a control
- }