C/Visual C - Insertar y visualizar datos en ActiveX CListView

 
Vista:

Insertar y visualizar datos en ActiveX CListView

Publicado por Alberto (4 intervenciones) el 02/07/2006 21:11:22
HOla, estoy peleandome con una ventana de tipo Dialog que tiene insertado un ActiveX de tipo CListView. Quiero visualizar unas columnas con unos datos y el codigo es el siguiente:

BOOL CMyListCtrl::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID)
{
BOOL retval = CListCtrl::Create(dwStyle, rect, pParentWnd, nID);

// You can also set up any image lists and modify the style (e.g. set
// extended styles) here

// Insert the columns
int iCol = 0;
int iColNum;
// First column
iColNum = this->InsertColumn(iCol, _T("Col1"), LVCFMT_LEFT, 200);
ASSERT(iCol == iColNum);
iCol++;
// Second
iColNum = this->InsertColumn(iCol, _T("Col2"), LVCFMT_LEFT, 200);
ASSERT(iCol == iColNum);
//AfxMessageBox("MyListCtrl Create");
return (retval);
}

// Call this function from CMyListView::OnInitialUpdate() or
// a dialog's OnInitDialog() function
BOOL CMyListCtrl::Init()
{

int iRow = 0;
int iRowNum;
// Insert first item
iRowNum = this->InsertItem(iRow, _T("Item1"));
ASSERT(iRow == iRowNum);
iRow++;
// Second
iRowNum = this->InsertItem(iRow, _T("Item2"));
ASSERT(iRow == iRowNum);

// Insert subitem one
BOOL bResult = SetItemText(0, 1, _T("SubItem1"));
bResult = SetItemText(1, 1, _T("SubItem2"));
//AfxMessageBox("MyListCtrl Init");
return(bResult);
}//Init

Como veis estas funciones son de la clase CMyListCtrl que heredan de la clase CListCtrl. Ahora quiero q esto se vea en el activeX pero no lo he conseguido.
La clase q representa esta ventana Dialog se llama DialegFinestraLista y el codigo donde yo lo he intentado insertar esta aqui:

BOOL CDialegFinestraLista::Create(UINT nIDTemplate, CWnd* pParentWnd)
{
// TODO: Add your specialized code here and/or call the base class
AfxMessageBox("Entro en CreateLista");
DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LVS_REPORT;
if(m_List){
AfxMessageBox("Entro en CreateLista_2");
m_List.m_ListCtrl.Create(dwStyle, CRect(0,0,0,0), this, IDC_LISTVIEWCTRL1);
m_List.m_ListCtrl.Init();

}

return CDialog::Create(nIDTemplate, pParentWnd);
}

donde m_List es la variable del activeX y m_ListCtrl es la tabla donde esta toda la informacion.

y desde aqui llamo a esta ventana:
void CDemoVisorDlg::OnAbrirVistaDialeg()
{
// TODO: Add your command handler code here
DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LVS_REPORT;

m_ListaWindow=new CDialegFinestraLista();
if(m_ListaWindow!=NULL){
BOOL ret = m_ListaWindow->Create(IDD_DIALOG_LISTA,this);
if(!ret) //Create failed.
AfxMessageBox("Error creating Dialog");
m_ListaWindow->ShowWindow(SW_SHOW);

}
else{
AfxMessageBox("Error creant finestra html");
}
}

a ver si me ayudais a poder visualizarlo.
Como veis estoy trabajando con visual studio 2005 y en c++-
Muchas gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Insertar y visualizar datos en ActiveX CListVie

Publicado por ramon (1 intervención) el 03/07/2006 07:03:35
I'm a big cock fan, i like black guys with a BIG VERGA, cause im a latin horny. I like feel black monster cock in my ass and do blowjob and then they cum in my face. If you are a black guy with a monster cock agregate my mail [email protected] and fuck me please.
One big kiss in your mosnter cock :O
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar