Click here to Skip to main content
15,891,946 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Events for Combobox in Visual C++ Pin
Invinci19-Oct-09 4:33
Invinci19-Oct-09 4:33 
GeneralRe: Events for Combobox in Visual C++ Pin
Maximilien19-Oct-09 4:35
Maximilien19-Oct-09 4:35 
QuestionAnalysing call stack.. [modified] Pin
Elsie19-Oct-09 3:07
Elsie19-Oct-09 3:07 
AnswerRe: Analysing call stack.. Pin
theCPkid19-Oct-09 19:28
theCPkid19-Oct-09 19:28 
QuestionHow to catch WM_CLOSE by using hook Pin
[N][Q][H]19-Oct-09 3:04
[N][Q][H]19-Oct-09 3:04 
QuestionRe: How to catch WM_CLOSE by using hook Pin
David Crow19-Oct-09 3:18
David Crow19-Oct-09 3:18 
AnswerRe: How to catch WM_CLOSE by using hook Pin
[N][Q][H]19-Oct-09 5:09
[N][Q][H]19-Oct-09 5:09 
AnswerRe: How to catch WM_CLOSE by using hook Pin
Naveen19-Oct-09 3:41
Naveen19-Oct-09 3:41 
GeneralRe: How to catch WM_CLOSE by using hook Pin
[N][Q][H]19-Oct-09 5:01
[N][Q][H]19-Oct-09 5:01 
AnswerRe: How to catch WM_CLOSE by using hook Pin
carly3321-Oct-09 0:38
carly3321-Oct-09 0:38 
QuestionHelp with global variable in MFC dialog application Pin
moh.hijjawi19-Oct-09 1:04
moh.hijjawi19-Oct-09 1:04 
AnswerRe: Help with global variable in MFC dialog application Pin
CPallini19-Oct-09 1:54
mveCPallini19-Oct-09 1:54 
GeneralRe: Help with global variable in MFC dialog application Pin
moh.hijjawi19-Oct-09 2:53
moh.hijjawi19-Oct-09 2:53 
GeneralRe: Help with global variable in MFC dialog application Pin
Hans Dietrich19-Oct-09 2:59
mentorHans Dietrich19-Oct-09 2:59 
GeneralRe: Help with global variable in MFC dialog application Pin
CPallini19-Oct-09 3:02
mveCPallini19-Oct-09 3:02 
GeneralRe: Help with global variable in MFC dialog application Pin
moh.hijjawi19-Oct-09 5:30
moh.hijjawi19-Oct-09 5:30 

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.