コード例 #1
0
LONG CuDlgSqlQueryPageXML::OnFetchRows (WPARAM wParam, LPARAM lParam)
{
	int nStatus = (int)wParam;
	switch (nStatus)
	{
	case CaExecParamQueryRows::FETCH_NORMAL_ENDING:
		// LPARAM = (Total number of rows fetched)
		break;
	case CaExecParamQueryRows::FETCH_REACH_LIMIT:
		break;
	case CaExecParamQueryRows::FETCH_ERROR:
		break;
	case CaExecParamQueryRows::FETCH_TRACEINFO:
		{
			CaExecParamQueryRows* pQueryRowParam = (CaExecParamQueryRows*)lParam;
			CfSqlQueryFrame* pFrame = (CfSqlQueryFrame*)GetParentFrame();
			if (pFrame && pQueryRowParam)
			{
				CuDlgSqlQueryResult* pDlgResult = pFrame->GetDlgSqlQueryResult();
				if (pDlgResult)
				{
					CuDlgSqlQueryPageRaw* pRawPage = pDlgResult->GetRawPage();
					ASSERT (pRawPage);
					CString strNew = (LPCTSTR)lParam;
					pDlgResult->DisplayTraceLine (strNew, NULL);
				}
			}
		}
		break;

	default:
		break;
	}
	return 0;
}
コード例 #2
0
void CvSqlQueryRichEditView::OnInitialUpdate() 
{
	CRichEditView::OnInitialUpdate();
	HFONT hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
	if (hFont == NULL)
		hFont = (HFONT)GetStockObject(ANSI_VAR_FONT);
	if (hFont)
		SendMessage(WM_SETFONT, (WPARAM)hFont);

	CdSqlQueryRichEditDoc* pDoc =(CdSqlQueryRichEditDoc*)GetDocument();
	CfSqlQueryFrame* pFrame  = (CfSqlQueryFrame*)GetParentFrame();
	CuDlgSqlQueryResult* pDlgResult = pFrame->GetDlgSqlQueryResult();
	CaSqlQueryProperty& property = pDoc->GetProperty();
	if (pDlgResult && property.IsTraceActivated() && property.IsTraceToTop())
	{
		pDlgResult->SelectRawPage();
	}
}