⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 financedlg.cpp

📁 这是一个学生信息管理系统
💻 CPP
📖 第 1 页 / 共 3 页
字号:
	m_FinanceTangibleDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
    m_FinanceBorrowDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceInvestDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceTransferDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinancePlanDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
}
void CFinanceDlg::OnFinanceBank()
{
	// TODO: 在此添加命令处理程序代码
	CRect r;
	m_Finance_TabCtrl.GetClientRect (&r);
	m_Finance_TabCtrl.SetCurSel (3);
	m_FinanceCashDlg.SetWindowPos (NULL,2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceIncomeDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
    m_FinanceOutcomeDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceBankDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_SHOWWINDOW);
	m_FinanceTangibleDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
    m_FinanceBorrowDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceInvestDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceTransferDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinancePlanDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
}
void CFinanceDlg::OnFinanceTangible()
{
	// TODO: 在此添加命令处理程序代码
	CRect r;
	m_Finance_TabCtrl.GetClientRect (&r);
	m_Finance_TabCtrl.SetCurSel (4);
	m_FinanceCashDlg.SetWindowPos (NULL,2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceIncomeDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
    m_FinanceOutcomeDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceBankDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceTangibleDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_SHOWWINDOW);
    m_FinanceBorrowDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceInvestDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceTransferDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinancePlanDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
}
void CFinanceDlg::OnFinanceBorrow()
{
	// TODO: 在此添加命令处理程序代码
	CRect r;
	m_Finance_TabCtrl.GetClientRect (&r);
	m_Finance_TabCtrl.SetCurSel (5);
	m_FinanceCashDlg.SetWindowPos (NULL,2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceIncomeDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
    m_FinanceOutcomeDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceBankDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceTangibleDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
    m_FinanceBorrowDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_SHOWWINDOW);
	m_FinanceInvestDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceTransferDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinancePlanDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
}
void CFinanceDlg::OnFinanceInvest()
{
	// TODO: 在此添加命令处理程序代码
	CRect r;
	m_Finance_TabCtrl.GetClientRect (&r);
	m_Finance_TabCtrl.SetCurSel (6);
	m_FinanceCashDlg.SetWindowPos (NULL,2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceIncomeDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
    m_FinanceOutcomeDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceBankDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceTangibleDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
    m_FinanceBorrowDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceInvestDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_SHOWWINDOW);
	m_FinanceTransferDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinancePlanDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
}
void CFinanceDlg::OnFinanceTransfer()
{
	// TODO: 在此添加命令处理程序代码
	CRect r;
	m_Finance_TabCtrl.GetClientRect (&r);
	m_Finance_TabCtrl.SetCurSel (7);
	m_FinanceCashDlg.SetWindowPos (NULL,2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceIncomeDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
    m_FinanceOutcomeDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceBankDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceTangibleDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
    m_FinanceBorrowDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceInvestDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceTransferDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_SHOWWINDOW);
	m_FinancePlanDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
}
void CFinanceDlg::OnFinancePlan()
{
	// TODO: 在此添加命令处理程序代码
	CRect r;
	m_Finance_TabCtrl.GetClientRect (&r);
	m_Finance_TabCtrl.SetCurSel (8);
	m_FinanceCashDlg.SetWindowPos (NULL,2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceIncomeDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
    m_FinanceOutcomeDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceBankDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceTangibleDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
    m_FinanceBorrowDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceInvestDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinanceTransferDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_HIDEWINDOW);
	m_FinancePlanDlg.SetWindowPos (NULL, 2,22,r.right -5, r.bottom -25,SWP_SHOWWINDOW);
}
void CFinanceDlg::OnFinanceClose ()
{
    KillTimer(FINANCE_TIMER);
//	this->DestroyWindow ();
//	CDialog::OnClose ();
	SendMessage(WM_CLOSE);
}
void CFinanceDlg::OnUpdateFinanceCash(CCmdUI *pCmdUI)
{
	// TODO: 在此添加命令更新用户界面处理程序代码
	pCmdUI->SetCheck (m_Finance_TabCtrl.GetCurSel ()==0);
}
void CFinanceDlg::OnUpdateFinanceIncome(CCmdUI *pCmdUI)
{
	// TODO: 在此添加命令更新用户界面处理程序代码
	pCmdUI->SetCheck (m_Finance_TabCtrl.GetCurSel ()==1);
}
void CFinanceDlg::OnUpdateFinanceOutcome(CCmdUI *pCmdUI)
{
	// TODO: 在此添加命令更新用户界面处理程序代码
	pCmdUI->SetCheck (m_Finance_TabCtrl.GetCurSel ()==2);
}
void CFinanceDlg::OnUpdateFinanceBank(CCmdUI *pCmdUI)
{
	// TODO: 在此添加命令更新用户界面处理程序代码
	pCmdUI->SetCheck (m_Finance_TabCtrl.GetCurSel ()==3);
}
void CFinanceDlg::OnUpdateFinanceTangible(CCmdUI *pCmdUI)
{
	// TODO: 在此添加命令更新用户界面处理程序代码
	pCmdUI->SetCheck (m_Finance_TabCtrl.GetCurSel ()==4);
}
void CFinanceDlg::OnUpdateFinanceBorrow(CCmdUI *pCmdUI)
{
	// TODO: 在此添加命令更新用户界面处理程序代码
	pCmdUI->SetCheck (m_Finance_TabCtrl.GetCurSel ()==5);
}
void CFinanceDlg::OnUpdateFinanceInvest(CCmdUI *pCmdUI)
{
	// TODO: 在此添加命令更新用户界面处理程序代码
	pCmdUI->SetCheck (m_Finance_TabCtrl.GetCurSel ()==6);
}
void CFinanceDlg::OnUpdateFinanceTransfer(CCmdUI *pCmdUI)
{
	// TODO: 在此添加命令更新用户界面处理程序代码
	pCmdUI->SetCheck (m_Finance_TabCtrl.GetCurSel ()==7);
}
void CFinanceDlg::OnUpdateFinancePlan(CCmdUI *pCmdUI)
{
	// TODO: 在此添加命令更新用户界面处理程序代码
	pCmdUI->SetCheck (m_Finance_TabCtrl.GetCurSel ()==8);
}

void CFinanceDlg::OnContextMenu(CWnd* pWnd, CPoint point)
{
	// TODO: 在此处添加消息处理程序代码
	CMenu menu;
    CPoint pos=point;
	ScreenToClient(&pos);
	CRect rect;
	GetClientRect(&rect);
	if(rect.PtInRect (pos))
	{
	menu.LoadMenu(IDR_FINANCE_MENU);
	menu.GetSubMenu (0)->TrackPopupMenu (TPM_LEFTALIGN|TPM_RIGHTBUTTON, point.x, point.y, this);
	return ;
	}
	CWnd::OnContextMenu (pWnd,point);
}
void CFinanceDlg::OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex,BOOL bSysMenu)
{   
	ASSERT(pPopupMenu != NULL);    // Check the enabled state of various menu items.    
    CCmdUI state;    
	state.m_pMenu = pPopupMenu;    
	ASSERT(state.m_pOther == NULL);    
	ASSERT(state.m_pParentMenu == NULL);    // Determine if menu is popup in top-level menu and set m_pOther to    
	// it if so (m_pParentMenu == NULL indicates that it is secondary popup).    
	HMENU hParentMenu;    
	if (AfxGetThreadState()->m_hTrackingMenu == pPopupMenu->m_hMenu)        state.m_pParentMenu = pPopupMenu;   
	// Parent == child for tracking popup.    
	else if ((hParentMenu = ::GetMenu(m_hWnd)) != NULL)    
	{        
		CWnd* pParent = this;           
		// Child windows don't have menus--need to go to the top!       
		if (pParent != NULL &&(hParentMenu = ::GetMenu(pParent->m_hWnd)) != NULL)        
		{           
			int nIndexMax = ::GetMenuItemCount(hParentMenu);          
			for (int nIndex = 0; nIndex < nIndexMax; nIndex++)           
			{            
				if (::GetSubMenu(hParentMenu, nIndex) == pPopupMenu->m_hMenu)            
				{               
					// When popup is found, m_pParentMenu is containing menu.                
					state.m_pParentMenu = CMenu::FromHandle(hParentMenu);                
					break;            
				}           
			}        
		}    
	}    
	state.m_nIndexMax = pPopupMenu->GetMenuItemCount();    
	for (state.m_nIndex = 0; state.m_nIndex < state.m_nIndexMax;      
		state.m_nIndex++)    
	{        
		state.m_nID = pPopupMenu->GetMenuItemID(state.m_nIndex);        
		if (state.m_nID == 0)           
			continue; // Menu separator or invalid cmd - ignore it.        
		ASSERT(state.m_pOther == NULL);        
		ASSERT(state.m_pMenu != NULL);        
		if (state.m_nID == (UINT)-1)        
		{           
			// Possibly a popup menu, route to first item of that popup.          
			state.m_pSubMenu = pPopupMenu->GetSubMenu(state.m_nIndex);  
			if (state.m_pSubMenu == NULL||(state.m_nID = state.m_pSubMenu->GetMenuItemID(0)) == 0 ||state.m_nID == (UINT)-1)           
			{            
				continue;       // First item of popup can't be routed to.           
			}           
			state.DoUpdate(this, TRUE);   // Popups are never auto disabled.       
		}        
		else        
		{           // Normal menu item.           
			// Auto enable/disable if frame window has m_bAutoMenuEnable           
			// set and command is _not_ a system command.           
			state.m_pSubMenu = NULL;           
			state.DoUpdate(this, FALSE);        
		}        
		// Adjust for menu deletions and additions.        
		UINT nCount = pPopupMenu->GetMenuItemCount();        
		if (nCount < state.m_nIndexMax)        
		{           
			state.m_nIndex -= (state.m_nIndexMax - nCount);           
			while (state.m_nIndex < nCount &&            
				pPopupMenu->GetMenuItemID(state.m_nIndex) == state.m_nID) 
			{            
				state.m_nIndex++;          
			}        
		}        
		state.m_nIndexMax = nCount;    
	}
} 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -