예제 #1
0
void CGotoDlg::OnGoto() 
{
	CMDIFrameWnd* pMainFrame = DYNAMIC_DOWNCAST(CMDIFrameWnd, AfxGetMainWnd());
	CChildFrame *pFrame = DYNAMIC_DOWNCAST( CChildFrame, pMainFrame->MDIGetActive() );

	CString csBmkNumber;
	m_txtChangeNumber.GetWindowText(csBmkNumber);

	if (!pFrame->Navigate(NAV_GOTO, _ttoi(csBmkNumber)))
	{
		CStdString csMsg = /*TXTEX*/CStdString::LoadResource(IDS_TXTEX_theChangeNumberEnteredDoesNotExistInCurrentDocument5050,_T("The change number entered does not exist in the current document."));
		GetApp()->ShowMessageEx(this->m_hWnd, csMsg, WsOK, WsDefault, WsInfoIcon, L"", CDeltaVwApp::GetProductHelpID(HIDC_CHANGE_NOT_FOUND), LOG_LOCATION);
	}
	BringWindowToTop();
	m_txtChangeNumber.SetSel(0,-1);
}