关于登陆模块中中出现的问题
1.变量有两个属性的问题
//{{AFX_DATA_MAP(CLoginDlg)
DDX_Control(pDX, IDC_EDIT1, m_ctrPass);
DDX_Control(pDX, IDC_COMBO1, m_ctrUser);
DDX_CBString(pDX, IDC_COMBO1, m_strUser);
DDX_Text(pDX, IDC_EDIT1, m_strPass);
DDX_Control(pDX, IDC_EDIT1, m_ctrPass);
DDX_Control(pDX, IDC_COMBO1, m_ctrUser);
DDX_CBString(pDX, IDC_COMBO1, m_strUser);
DDX_Text(pDX, IDC_EDIT1, m_strPass);
在数据绑定中可以对一个控件加上若干个属性
2.CUserSet的定义 虽然定义了相关的类但是要使用CRecordset
必须在stdafx.h加上头文件
#include <odbcinst.h>//ODBC数据库API头文件
#include <afxdb.h>
#include <afxdb.h>
3. m_bIsAdmin;变量先要到
class CLibraryApp : public CWinApp
{
public:
CLibraryApp();
public:
BOOL m_bIsAdmin;
CString m_strOperator;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CLibraryApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
{
public:
CLibraryApp();
public:
BOOL m_bIsAdmin;
CString m_strOperator;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CLibraryApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CLibraryApp)
afx_msg void OnAppAbout();
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
定义
//{{AFX_MSG(CLibraryApp)
afx_msg void OnAppAbout();
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
定义
其他明天再发
转载于:https://blog.51cto.com/suxiangjuner/144408