什么登陆界面?? 是启动程序时的登陆界面还是其他?
return 0;
}
现在想放到这里了,但是还不行
这是CLogin里的代码:
BOOL CLogin::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CMainFrame* pMain=(CMainFrame*)AfxGetMainWnd();
CChickensDoc* pDoc=(CChickensDoc*)pMain->GetActiveDocument();
pDoc->m_rec->Open("select * from OPERATOR",pDoc->m_con.GetInterfacePtr(),adOpenDynamic,adLockOptimistic,adCmdText);
if(!pDoc->m_rec->BOF)
{
_variant_t var;
CString oper;
pDoc->m_rec->MoveFirst();
while(!pDoc->m_rec->SSTEOF)
{
var=pDoc->m_rec->GetCollect("checkperson");
if(var.vt!=NULL)
{
oper=(LPCSTR)_bstr_t(var);
m_Name.AddString(oper);
}
}
}
else
{
AfxMessageBox("无数据");
return FALSE;
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
只要用到上面的代码就不能执行,说信息丢失