Click here to Skip to main content
15,902,198 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC exe not working in non VC++ system Pin
Anu_Bala12-Feb-08 17:29
Anu_Bala12-Feb-08 17:29 
JokeRe: MFC exe not working in non VC++ system Pin
Rajesh R Subramanian12-Feb-08 19:50
professionalRajesh R Subramanian12-Feb-08 19:50 
GeneralDrop List in a Combo Box Pin
Davros12-Feb-08 4:30
Davros12-Feb-08 4:30 
GeneralRe: Drop List in a Combo Box Pin
Iain Clarke, Warrior Programmer12-Feb-08 5:05
Iain Clarke, Warrior Programmer12-Feb-08 5:05 
GeneralRe: Drop List in a Combo Box Pin
Davros12-Feb-08 5:15
Davros12-Feb-08 5:15 
GeneralRe: Drop List in a Combo Box Pin
Davros12-Feb-08 5:20
Davros12-Feb-08 5:20 
GeneralRe: Drop List in a Combo Box Pin
Iain Clarke, Warrior Programmer12-Feb-08 5:56
Iain Clarke, Warrior Programmer12-Feb-08 5:56 
GeneralRe: Drop List in a Combo Box Pin
Davros12-Feb-08 6:00
Davros12-Feb-08 6:00 
Hi Iain

I tried your suggestion and still no luck. Very strange! This was done on VS 2008 but I get exactly the same thing in Visual Studio 2005.

Here's my dialog code:

// TestDialog.cpp : implementation file
//

#include "stdafx.h"
#include "mfc2008combodroplist.h"
#include "TestDialog.h"


// TestDialog dialog

IMPLEMENT_DYNAMIC(TestDialog, CDialog)

TestDialog::TestDialog(CWnd* pParent /*=NULL*/)
: CDialog(TestDialog::IDD, pParent)
{

}

TestDialog::~TestDialog()
{
}

void TestDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_COMBO1, m_comboBox);
}


BEGIN_MESSAGE_MAP(TestDialog, CDialog)
END_MESSAGE_MAP()


// TestDialog message handlers

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

// TODO: Add extra initialization here

m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("G"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("D"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("G"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("G"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("D"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("G"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("G"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("D"));
m_comboBox.AddString(_T("A"));
m_comboBox.AddString(_T("G"));
m_comboBox.AddString(_T("A"));

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

and the header:

#pragma once
#include "afxwin.h"


// TestDialog dialog

class TestDialog : public CDialog
{
DECLARE_DYNAMIC(TestDialog)

public:
TestDialog(CWnd* pParent = NULL); // standard constructor
virtual ~TestDialog();

// Dialog Data
enum { IDD = IDD_DIALOG1 };

protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support

DECLARE_MESSAGE_MAP()
public:
CComboBox m_comboBox;
virtual BOOL OnInitDialog();
};
GeneralRe: Drop List in a Combo Box Pin
Davros12-Feb-08 6:07
Davros12-Feb-08 6:07 
GeneralRe: Drop List in a Combo Box Pin
Iain Clarke, Warrior Programmer12-Feb-08 6:18
Iain Clarke, Warrior Programmer12-Feb-08 6:18 
GeneralRe: Drop List in a Combo Box Pin
Davros12-Feb-08 6:31
Davros12-Feb-08 6:31 
GeneralRe: Drop List in a Combo Box Pin
Davros12-Feb-08 7:02
Davros12-Feb-08 7:02 
GeneralRe: Drop List in a Combo Box Pin
Davros12-Feb-08 7:47
Davros12-Feb-08 7:47 
GeneralRe: Drop List in a Combo Box Pin
Iain Clarke, Warrior Programmer12-Feb-08 9:03
Iain Clarke, Warrior Programmer12-Feb-08 9:03 
GeneralRe: Drop List in a Combo Box Pin
Davros12-Feb-08 9:13
Davros12-Feb-08 9:13 
GeneralRe: Drop List in a Combo Box Pin
Davros13-Feb-08 0:12
Davros13-Feb-08 0:12 
QuestionRe: Drop List in a Combo Box Pin
David Crow12-Feb-08 7:49
David Crow12-Feb-08 7:49 
GeneralRe: Drop List in a Combo Box Pin
Davros12-Feb-08 9:11
Davros12-Feb-08 9:11 
GeneralSensor accessing Pin
SnaKeBeD12-Feb-08 4:18
SnaKeBeD12-Feb-08 4:18 
GeneralRe: Sensor accessing Pin
Matthew Faithfull12-Feb-08 4:28
Matthew Faithfull12-Feb-08 4:28 
GeneralRe: Sensor accessing Pin
SnaKeBeD12-Feb-08 4:35
SnaKeBeD12-Feb-08 4:35 
GeneralRe: Sensor accessing Pin
Cedric Moonen12-Feb-08 4:44
Cedric Moonen12-Feb-08 4:44 
GeneralRe: Sensor accessing Pin
Matthew Faithfull12-Feb-08 4:57
Matthew Faithfull12-Feb-08 4:57 
GeneralRe: Sensor accessing Pin
Cedric Moonen12-Feb-08 4:36
Cedric Moonen12-Feb-08 4:36 
GeneralRe: Sensor accessing Pin
SnaKeBeD12-Feb-08 4:42
SnaKeBeD12-Feb-08 4:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.