Home > Software engineering >  The couple for help!
The couple for help!

Time:02-11

I want to know the following code that a control with the technology or what component
Please forgive me I am a small white to you
Bother everybody to give directions



 # ifdef _DEBUG 
# define new DEBUG_NEW
# undef THIS_FILE
The static char THIS_FILE []=__FILE__;
# endif

//-- -- -- -- -- -- -- -- -- -- -- -- -- the global
Extern CDatabase m_hDatabase;
//-- -- -- -- -- -- -- -- -- -- -- -- end

/////////////////////////////////////////////////////////////////////////////
//CDlgSpxxgl dialog


CDlgSpxxgl: : CDlgSpxxgl (pParent/*=NULL CWnd * */)
: CDialog (CDlgSpxxgl: : IDD, pParent)
{
//{{AFX_DATA_INIT (CDlgSpxxgl)
//}} AFX_DATA_INIT
}


Void CDlgSpxxgl: : DoDataExchange (CDataExchange * symbol)
{
CDialog: : DoDataExchange (symbol);
//{{AFX_DATA_MAP (CDlgSpxxgl)
DDX_Control (symbol, IDC_EDIT_SPBH m_hEditSpbh);
DDX_Control (symbol, IDOK m_hBtnOk);
DDX_Control (symbol, IDC_BTN_SAVE m_hBtnSave);
DDX_Control (symbol, IDC_BTN_MOD m_hBtnMod);
DDX_Control (symbol, IDC_BTN_DEL m_hBtnDel);
DDX_Control (symbol, IDC_BTN_ADD m_hBtnAdd);
DDX_Control (symbol, IDC_LIST_SPXX m_hListSpxx);
DDX_Control (symbol, IDC_EDIT_ZJM m_hEditZjm);
DDX_Control (symbol, IDC_EDIT_NAME m_hEditName);
DDX_Control (symbol, IDC_EDIT_MRJG m_hEditMrjg);
DDX_Control (symbol, IDC_EDIT_GG m_hEditGg);
DDX_Control (symbol, IDC_EDIT_CJ m_hEditCj);
DDX_Control (symbol, IDC_EDIT_BZ m_hEditBz);
DDX_Control (symbol, IDC_TAB_SPXX m_hTabSpxx);
//}} AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP (CDlgSpxxgl CDialog)
//{{AFX_MSG_MAP (CDlgSpxxgl)
ON_NOTIFY (TCN_SELCHANGE IDC_TAB_SPXX, OnSelchangeTabSpxx)
ON_NOTIFY (NM_CLICK IDC_LIST_SPXX, OnClickListSpxx)
ON_NOTIFY (NM_DBLCLK IDC_LIST_SPXX, OnDblclkListSpxx)
ON_BN_CLICKED (IDC_BTN_ADD OnBtnAdd)
ON_BN_CLICKED (IDC_BTN_DEL OnBtnDel)
ON_BN_CLICKED (IDC_BTN_MOD OnBtnMod)
ON_BN_CLICKED (IDC_BTN_SAVE OnBtnSave)
//}} AFX_MSG_MAP
END_MESSAGE_MAP ()

/////////////////////////////////////////////////////////////////////////////
//CDlgSpxxgl message handlers

BOOL CDlgSpxxgl: : OnInitDialog ()
{
CDialog: : OnInitDialog ();

//TODO: Add extra initialization here

InitCtrlData ();

Return TRUE;//return TRUE unless you set the focus to a control
//the EXCEPTION: OCX Property Pages should return FALSE
}

Void CDlgSpxxgl: : OnSelchangeTabSpxx (NMHDR * pNMHDR, LRESULT * pResult)
{
//TODO: Add your the control notification handler code here

The switch (m_hTabSpxx GetCurSel ())
{
Case 0:
M_hEditZjm. ShowWindow (TRUE);
M_hEditName. ShowWindow (TRUE);
M_hEditMrjg. ShowWindow (TRUE);
M_hEditGg. ShowWindow (TRUE);
M_hEditCj. ShowWindow (TRUE);
M_hEditBz. ShowWindow (TRUE);
M_hEditSpbh. ShowWindow (TRUE);

M_hListSpxx. ShowWindow (FALSE);
Break;
Case 1:
M_hEditZjm. ShowWindow (FALSE);
M_hEditName. ShowWindow (FALSE);
M_hEditMrjg. ShowWindow (FALSE);
M_hEditGg. ShowWindow (FALSE);
M_hEditCj. ShowWindow (FALSE);
M_hEditBz. ShowWindow (FALSE);
M_hEditSpbh. ShowWindow (FALSE);

M_hListSpxx. ShowWindow (TRUE);
Break;
}
* pResult=0;

M_hDatabase. ListSpxxToCtrl (& amp; M_hListSpxx);
}

Void CDlgSpxxgl: : InitCtrlData ()
{
//Init TAB CTRL
M_hTabSpxx. InsertItem (0, "commodity basic information");
M_hTabSpxx. InsertItem (1, "commodity information list");
M_hTabSpxx. ShowWindow (TRUE);

M_hListSpxx. InsertColumn (0, "ID", LVCFMT_CENTER, 30);
M_hListSpxx. InsertColumn (1, "name of commodity," LVCFMT_CENTER, 100);
M_hListSpxx. InsertColumn (2, "specifications", LVCFMT_CENTER, 50);
M_hListSpxx. InsertColumn (3, "mnemonic code", LVCFMT_CENTER, 50);
M_hListSpxx. InsertColumn (4, "the default specification", LVCFMT_CENTER, 60).
M_hListSpxx. InsertColumn (5, "manufacturer", LVCFMT_CENTER, 120);
M_hListSpxx. InsertColumn (6, "note", LVCFMT_CENTER, 100);
M_hListSpxx. SetExtendedStyle (m_hListSpxx. GetStyle () | LVS_EX_FULLROWSELECT);

///INIT BUTTON CTRL
M_hBtnOk. SetIcon (IDI_ICON_CLOSE);
M_hBtnOk. OffsetColor (CButtonST: : BTNST_COLOR_BK_IN, shBtnColor);
M_hBtnOk. SetColor (CButtonST: : BTNST_COLOR_FG_IN, RGB (0, 128, 0));

M_hBtnSave. SetIcon (IDI_ICON_OK);
M_hBtnSave. OffsetColor (CButtonST: : BTNST_COLOR_BK_IN, shBtnColor);
M_hBtnSave. SetColor (CButtonST: : BTNST_COLOR_FG_IN, RGB (0, 128, 0));
M_hBtnSave. EnableWindow (FALSE);

M_hBtnDel. SetIcon (IDI_ICON_DEL);
M_hBtnDel. OffsetColor (CButtonST: : BTNST_COLOR_BK_IN, shBtnColor);
M_hBtnDel. SetColor (CButtonST: : BTNST_COLOR_FG_IN, RGB (0, 128, 0));

M_hBtnAdd. SetIcon (IDI_ICON_ADD);
M_hBtnAdd. OffsetColor (CButtonST: : BTNST_COLOR_BK_IN, shBtnColor);
M_hBtnAdd. SetColor (CButtonST: : BTNST_COLOR_FG_IN, RGB (0, 128, 0));

M_hBtnMod. SetIcon (IDI_ICON_MOD);
M_hBtnMod. OffsetColor (CButtonST: : BTNST_COLOR_BK_IN, shBtnColor);
M_hBtnMod. SetColor (CButtonST: : BTNST_COLOR_FG_IN, RGB (0, 128, 0));


///
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related