Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
From novice to tech pro — start learning today.
1) Insert a dialog via the resource editor. Give IDD_MYDIALOG as its resource ID by right clicking and then go to properties.
2) Place combo box control over that dialog which is created and name IDC_MYCOMBO as its resource ID
3) Create a new class which is derived from CDialog name it CMyDialog
sample code here
//MyDialog.h
class CMyDialog: public CDialog
{
public:
CMyDialog(CWnd* pParent = NULL); // standard constructor
enum { IDD = IDD_MYDIALOG };
virtual void DoDataExchange(CDataExchan
virtual BOOL OnInitDialog();
}
4)//MyDialog.cpp
#include <MyDialog.h>
CMyDialog::CMyDialog(CWnd*
: CDialog(CMyDialog::IDD, pParent)
{
}
void CMyDialog::DoDataExchange(
{
CDialog::DoDataExchange(pD
}
BEGIN_MESSAGE_MAP(CMyDialo
END_MESSAGE_MAP()
BOOL CMyDialog::OnInitDialog()
{
CDialog::OnInitDialog();
CComboBox *pCombo = (CComboBox *)GetDlgItem(IDC_MYCOMBO);
//Change or add combo box details here
return TRUE;
}
These are the mimimum steps which are mentioned.