How do I make a chat window in C++ 2010?

Hi, I would like to make a chat window in C++ 2010, so that you can type all you want,and when you press enter, it will send it, but first I would like the MessageBox please. I don't want code, I am doing the Windows forms application.
Thanks!
Here's all my code so far:

#pragma once

namespace Chat {

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

/// <summary>
/// Summary for Form1
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}

protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::NotifyIcon^ notifyIcon1;
protected:
private: System::Windows::Forms::RichTextBox^ richTextBox1;
private: System::Windows::Forms::CheckBox^ checkBox1;
private: System::Windows::Forms::Timer^ Durationtimer1;
private: System::ComponentModel::IContainer^ components;

private:
/// <summary>
/// Required designer variable.
/// </summary>


#pragma region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
this->components = (gcnew System::ComponentModel::Container());
this->notifyIcon1 = (gcnew System::Windows::Forms::NotifyIcon(this->components));
this->richTextBox1 = (gcnew System::Windows::Forms::RichTextBox());
this->checkBox1 = (gcnew System::Windows::Forms::CheckBox());
this->Durationtimer1 = (gcnew System::Windows::Forms::Timer(this->components));
this->SuspendLayout();
//
// notifyIcon1
//
this->notifyIcon1->Text = L"notifyIcon1";
this->notifyIcon1->Visible = true;
//
// richTextBox1
//
this->richTextBox1->Location = System::Drawing::Point(12, 12);
this->richTextBox1->Name = L"richTextBox1";
this->richTextBox1->Size = System::Drawing::Size(195, 75);
this->richTextBox1->TabIndex = 0;
this->richTextBox1->Text = L"";
this->richTextBox1->TextChanged += gcnew System::EventHandler(this, &Form1::richTextBox1_TextChanged);
//
// checkBox1
//
this->checkBox1->AutoSize = true;
this->checkBox1->Location = System::Drawing::Point(127, 70);
this->checkBox1->Name = L"checkBox1";
this->checkBox1->Size = System::Drawing::Size(118, 17);
this->checkBox1->TabIndex = 1;
this->checkBox1->Text = L"#pragma endregion";
this->checkBox1->UseVisualStyleBackColor = true;
//
// Durationtimer1
//
this->Durationtimer1->Enabled = true;
this->Durationtimer1->Interval = 5;
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(211, 90);
this->Controls->Add(this->checkBox1);
this->Controls->Add(this->richTextBox1);
this->Name = L"Form1";
this->Text = L"Form1";
this->ResumeLayout(false);
this->PerformLayout();

}
#pragma endregion
private: System::Void richTextBox1_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
};
}


Last edited on
Topic archived. No new replies allowed.