中冶集团资质:vc问题一个
来源:百度文库 编辑:查人人中国名人网 时间:2024/08/31 22:13:02
CPacketInfo类,父类CObject
int CPacketInfo::StartCaputre(CPacketInfo& pi )
{
CDevListDlg declist;
............
declist.SetDevList(ch,d->name,d->description);//出错->
调试:_AFXCMN_INLINE int CListCtrl::InsertItem(int nItem, LPCTSTR lpszItem)
{ ASSERT(::IsWindow(m_hWnd));<-这里出错了 ??
return InsertItem(LVIF_TEXT, nItem, lpszItem, 0, 0, 0, 0); }
......}
CDevListDlg类
class CDevListDlg : public CDialog
{
// Construction
public:
void SetDevList(char* a, char* b, char* c);
CDevListDlg(CWnd* pParent = NULL); /* standard constructor*/
CListCtrl m_devlist;
............
}
BOOL CDevListDlg::OnInitDialog()
{
CDialog::OnInitDialog();
m_devlist.InsertColumn(0,"设备号",LVCFMT_LEFT,80,-1);
m_devlist.InsertColumn(1,"名称",LVCFMT_LEFT,320,-1);
m_devlist.InsertColumn(2,"描述",LVCFMT_LEFT,250,-1);
UpdateData(false);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CDevListDlg::SetDevList(char* a, char* b, char* c)
{
int nitem;
nitem=m_devlist.InsertItem(0,a);
m_devlist.SetItemText(nitem,1,b);
m_devlist.SetItemText(nitem,2,c);
UpdateData(false);
}
int CPacketInfo::StartCaputre(CPacketInfo& pi )
{
CDevListDlg declist;
............
declist.SetDevList(ch,d->name,d->description);//出错->
调试:_AFXCMN_INLINE int CListCtrl::InsertItem(int nItem, LPCTSTR lpszItem)
{ ASSERT(::IsWindow(m_hWnd));<-这里出错了 ??
return InsertItem(LVIF_TEXT, nItem, lpszItem, 0, 0, 0, 0); }
......}
CDevListDlg类
class CDevListDlg : public CDialog
{
// Construction
public:
void SetDevList(char* a, char* b, char* c);
CDevListDlg(CWnd* pParent = NULL); /* standard constructor*/
CListCtrl m_devlist;
............
}
BOOL CDevListDlg::OnInitDialog()
{
CDialog::OnInitDialog();
m_devlist.InsertColumn(0,"设备号",LVCFMT_LEFT,80,-1);
m_devlist.InsertColumn(1,"名称",LVCFMT_LEFT,320,-1);
m_devlist.InsertColumn(2,"描述",LVCFMT_LEFT,250,-1);
UpdateData(false);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CDevListDlg::SetDevList(char* a, char* b, char* c)
{
int nitem;
nitem=m_devlist.InsertItem(0,a);
m_devlist.SetItemText(nitem,1,b);
m_devlist.SetItemText(nitem,2,c);
UpdateData(false);
}
你认为这种问题会有人回答你吗!