Click here to Skip to main content
15,909,332 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: error C2955: use of class template requires template argument list in C++/MFC Pin
CPallini19-Oct-09 11:12
mveCPallini19-Oct-09 11:12 
AnswerRe: error C2955: use of class template requires template argument list in C++/MFC Pin
Stuart Dootson19-Oct-09 12:58
professionalStuart Dootson19-Oct-09 12:58 
QuestionSetWindowsHookEx under Windows Service Pin
FotisSs19-Oct-09 8:02
FotisSs19-Oct-09 8:02 
AnswerRe: SetWindowsHookEx under Windows Service Pin
«_Superman_»19-Oct-09 8:29
professional«_Superman_»19-Oct-09 8:29 
GeneralRe: SetWindowsHookEx under Windows Service Pin
IvanProg3-Apr-10 4:11
IvanProg3-Apr-10 4:11 
AnswerRe: SetWindowsHookEx under Windows Service Pin
mirushaki27-Jul-15 1:26
mirushaki27-Jul-15 1:26 
QuestionhWnd passed into another class Pin
Nicola Curran19-Oct-09 5:44
Nicola Curran19-Oct-09 5:44 
AnswerRe: hWnd passed into another class Pin
Chris Losinger19-Oct-09 6:29
professionalChris Losinger19-Oct-09 6:29 
AnswerRe: hWnd passed into another class Pin
Cedric Moonen19-Oct-09 7:17
Cedric Moonen19-Oct-09 7:17 
AnswerRe: hWnd passed into another class Pin
theCPkid19-Oct-09 19:04
theCPkid19-Oct-09 19:04 
GeneralRe: hWnd passed into another class Pin
Nicola Curran19-Oct-09 21:36
Nicola Curran19-Oct-09 21:36 
QuestionRegarding the Record Position. Pin
janaswamy uday19-Oct-09 4:20
janaswamy uday19-Oct-09 4:20 
QuestionRe: Regarding the Record Position. Pin
David Crow19-Oct-09 4:52
David Crow19-Oct-09 4:52 
AnswerRe: Regarding the Record Position. Pin
Rajesh R Subramanian19-Oct-09 5:45
professionalRajesh R Subramanian19-Oct-09 5:45 
GeneralRe: Regarding the Record Position. Pin
janaswamy uday19-Oct-09 5:56
janaswamy uday19-Oct-09 5:56 
GeneralRe: Regarding the Record Position. Pin
Rajesh R Subramanian19-Oct-09 6:16
professionalRajesh R Subramanian19-Oct-09 6:16 
QuestionHow we show a message box & get user input in Win32 Dynamic-Link Library Pin
THAQCD19-Oct-09 4:19
THAQCD19-Oct-09 4:19 
AnswerRe: How we show a message box & get user input in Win32 Dynamic-Link Library Pin
Richard MacCutchan19-Oct-09 4:33
mveRichard MacCutchan19-Oct-09 4:33 
GeneralRe: How we show a message box & get user input in Win32 Dynamic-Link Library Pin
THAQCD19-Oct-09 6:11
THAQCD19-Oct-09 6:11 
GeneralRe: How we show a message box & get user input in Win32 Dynamic-Link Library Pin
Iain Clarke, Warrior Programmer19-Oct-09 8:08
Iain Clarke, Warrior Programmer19-Oct-09 8:08 
GeneralRe: How we show a message box & get user input in Win32 Dynamic-Link Library Pin
THAQCD19-Oct-09 8:26
THAQCD19-Oct-09 8:26 
GeneralRe: How we show a message box & get user input in Win32 Dynamic-Link Library Pin
Tim Craig19-Oct-09 8:31
Tim Craig19-Oct-09 8:31 
GeneralRe: How we show a message box & get user input in Win32 Dynamic-Link Library Pin
Richard MacCutchan19-Oct-09 8:33
mveRichard MacCutchan19-Oct-09 8:33 
QuestionEvents for Combobox in Visual C++ [modified] Pin
Invinci19-Oct-09 4:09
Invinci19-Oct-09 4:09 
Hi, i am new to Visual C++ and facing problem with combo boxes.

Here is what i need:

Combobox1
Choice: Metal, Plastic

Combobox2
Choice: if Metal in Combobox1: 2,3,4,5,6
Choice: if Plastic in Combobox1: 8,10,15

I am unable to write code for the event, can any one help me out with the hints or links or code!...any help is highly appreciated...!

#pragma once
namespace PR {

    using namespace System;    using namespace System::ComponentModel;    using namespace System::Collections;
    using namespace System::Windows::Forms;    using namespace System::Data;    using namespace System::Drawing;

    public ref class Form1 : public System::Windows::Forms::Form
    {
    public:
        Form1(void)
        {   InitializeComponent();
            //TODO: Add the constructor code here
        }
    protected:
        /// Clean up any resources being used.
        ~Form1()
        {
            if (components)
            {
                delete components;
            }
        }
    private: System::Windows::Forms::ComboBox^  comboBox1;
    protected:
    private: System::Windows::Forms::ComboBox^  comboBox2;
    private:
        /// Required designer variable.
        System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        void InitializeComponent(void)
        {
            this->comboBox1 = (gcnew System::Windows::Forms::ComboBox());
            this->comboBox2 = (gcnew System::Windows::Forms::ComboBox());
            this->SuspendLayout();
            // comboBox1
            this->comboBox1->FormattingEnabled = true;
            this->comboBox1->Items->AddRange(gcnew cli::array< System::Object^  >(2) {L"METAL", L"PLASTIC"});
            this->comboBox1->Location = System::Drawing::Point(81, 80);
            this->comboBox1->Name = L"comboBox1";
            this->comboBox1->Size = System::Drawing::Size(121, 21);
            this->comboBox1->TabIndex = 0;
            this->comboBox1->Text = L"METAL";
            // comboBox2
            this->comboBox2->FormattingEnabled = true;
            this->comboBox2->Items->AddRange(gcnew cli::array< System::Object^  >(5) {L"2", L"3", L"4", L"5", L"6"});
            this->comboBox2->Location = System::Drawing::Point(81, 126);
            this->comboBox2->Name = L"comboBox2";
            this->comboBox2->Size = System::Drawing::Size(121, 21);
            this->comboBox2->TabIndex = 1;
            this->comboBox2->Text = L"2";
            this->comboBox2->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::comboBox2_SelectedIndexChanged);
            // Form1
            this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
            this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
            this->ClientSize = System::Drawing::Size(292, 266);
            this->Controls->Add(this->comboBox2);
            this->Controls->Add(this->comboBox1);
            this->Name = L"Form1";
            this->Text = L"Form1";
            this->ResumeLayout(false);
        }
#pragma endregion
     private: System::Void comboBox2_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) {
             }
    };
}


modified on Monday, October 19, 2009 10:27 AM

AnswerRe: Events for Combobox in Visual C++ Pin
Maximilien19-Oct-09 4:20
Maximilien19-Oct-09 4:20 

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.