In article I am going to show you your own text editor using visual c++.
The following program is a Text Editor. It has been developed using Visual C++ .NET in the Visual Studio 2013 Express IDE. It can be used to work with .txt files, similar to the NotePad application which comes bundled with Windows. It provides you with ability to perform all the tasks you normally perform in a Text Editor, including printing documents. The screenshots below describe its functionality:-
Here is a Sample of source code the full source is provided in the link below
#include "MyForm.h" using namespace System; using namespace System::Windows::Forms; [STAThread] int main(array<String^>^ args) { Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); MicrosoftWord::MyForm form; Application::Run(%form); }
We have to program a header file in order to work
void InitializeComponent(void) { System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(MyForm::typeid)); this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip()); this->fileToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->newToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->openToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->saveAsToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->printToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->printPreviewToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->closeToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->helpToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->viewHelpToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->aboutToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->microsoftWordVersion10ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->creditsToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->thisProgramIsDesignedAndProgrammedByManishKumarToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->textBox1 = (gcnew System::Windows::Forms::TextBox()); this->colorDialog1 = (gcnew System::Windows::Forms::ColorDialog()); this->fontDialog1 = (gcnew System::Windows::Forms::FontDialog()); this->saveFileDialog1 = (gcnew System::Windows::Forms::SaveFileDialog()); this->printDialog1 = (gcnew System::Windows::Forms::PrintDialog()); this->printDocument1 = (gcnew System::Drawing::Printing::PrintDocument()); this->openFileDialog1 = (gcnew System::Windows::Forms::OpenFileDialog()); this->printPreviewDialog1 = (gcnew System::Windows::Forms::PrintPreviewDialog()); this->menuStrip1->SuspendLayout(); this->SuspendLayout(); // // menuStrip1 // this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) { this->fileToolStripMenuItem, this->helpToolStripMenuItem }); this->menuStrip1->Location = System::Drawing::Point(0, 0); this->menuStrip1->Name = L"menuStrip1"; this->menuStrip1->Size = System::Drawing::Size(1362, 24); this->menuStrip1->TabIndex = 1; this->menuStrip1->Text = L"menuStrip1"; // // fileToolStripMenuItem // this->fileToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(6) { this->newToolStripMenuItem, this->openToolStripMenuItem, this->saveAsToolStripMenuItem, this->printToolStripMenuItem, this->printPreviewToolStripMenuItem, this->closeToolStripMenuItem });
Here is the source code for entire software : link
Take your time to comment on this article
Source:[windcodebits]


