www.pudn.com > Shutdown.rar > Y_Cls_Combox_.cpp
// Y_Cls_Combox_.cpp : implementation file
//
#include "stdafx.h"
#include "Resource.h"
#include "Y_Cls_Combox_.h"
#include "Y_Cls_ListCtrl_.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Y_Cls_Combox_
Y_Cls_Combox_::Y_Cls_Combox_()
{
}
Y_Cls_Combox_::~Y_Cls_Combox_()
{
}
BEGIN_MESSAGE_MAP(Y_Cls_Combox_, CComboBox)
//{{AFX_MSG_MAP(Y_Cls_Combox_)
ON_WM_KILLFOCUS()
ON_CONTROL_REFLECT(CBN_SELCHANGE, OnSelchange)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Y_Cls_Combox_ message handlers
void Y_Cls_Combox_::OnKillFocus(CWnd* pNewWnd)
{
CComboBox::OnKillFocus(pNewWnd);
// TODO: Add your message handler code here
Y_Cls_ListCtrl_ *pWnd;
pWnd = (Y_Cls_ListCtrl_ *)GetParent();
pWnd->GetComboText();
PostMessage(WM_CLOSE);
}
void Y_Cls_Combox_::OnSelchange()
{
// TODO: Add your control notification handler code here
CString strText;
// if(m_ID ==IDC_LIST_Tower&&Old_iSubItem == 3)
// {
// this->GetWindowText(strText);
// if(strText ==CIRCLE_STR||strText ==GlOBE_STR)
// {
// Y_Cls_ListCtrl_ *pWnd;
// pWnd = (Y_Cls_ListCtrl_ *)GetParent();
// pWnd->SetItemText(Old_iItem,Old_iSubItem+3,"");
// if(strText == SOMEPOLE_STR)
// {
// pWnd->SetItemText(Old_iItem,Old_iSubItem+2,"");
// pWnd->SetItemText(Old_iItem,Old_iSubItem-1,"");
// }
// else if(strText ==GlOBE_STR)
// {
// pWnd->SetItemText(Old_iItem,Old_iSubItem+2,"");
// pWnd->SetItemText(Old_iItem,Old_iSubItem-1,"");
// }
// }
// }
}