|
// MyComboBox.cpp : implementation file
//
#include "stdafx.h"
#include "UpdateFromData.h"
#include "MyComboBox.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMyComboBox
CMyComboBox::CMyComboBox()
{
}
CMyComboBox::~CMyComboBox()
{
}
BEGIN_MESSAGE_MAP(CMyComboBox, CComboBox)
//{{AFX_MSG_MAP(CMyComboBox)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMyComboBox message handlers
int CMyComboBox::AddItemWithData(CString caption, DWORD data)
{
int index = -1;
index = AddString(caption);
if(index >= 0)
{
SetItemData(index, data);
}
return index;
}
void CMyComboBox::Dump()
{
CString text;
for(int index=0; index<GetCount(); index++)
{
GetLBText(index, text);
TRACE(_T("(%d, %s, %d)\n"), index, text,GetItemData(index));
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I have over 13 Years IT industry experience as Principle/Senior Programmer. I am experienced in .NET/J2EE system design and detailed implementation. I master UML modelling and OO design methodology with a strong C#/C++/Java coding background. I have been in working/managing a distributed project using Agile/Waterfall approach. My business knowledge includes Telecommunication, Financial Investment/Trading, and Banking.