ReportView消息响应函数列表

列标题响应函数

//处理列标题被点击消息响应
void CONUMenuConfigView::OnReportItemClick(NMHDR * pNotifyStruct, LRESULT * /*result*/)
{
	XTP_NM_REPORTRECORDITEM* pItemNotify = (XTP_NM_REPORTRECORDITEM*) pNotifyStruct;

	//只处理列标题被选择
	CXTPReportColumn *pColumn = pItemNotify->pColumn;
	if (NULL == pColumn)
	{
		return;
	}

	CString str = pColumn->GetCaption();

	int iColunmIndex = pColumn->GetItemIndex();
	//处理Row被选择
	CXTPReportRow *pRow = pItemNotify->pRow;
	if (NULL == pRow)
	{
		return;
	}

//	int iRowIndex = pRow->GetIndex();
	CXTPReportRecordItemText *pItem = (CXTPReportRecordItemText *)(
							pRow->GetRecord()->GetItem(iColunmIndex));
    str = pItem->GetValue();
}


你可能感兴趣的:(ReportView消息响应函数列表)