Click here to Skip to main content
14,272,052 members

ATL / WTL / STL

 
Questionvisual studio 2010 error help needed Pin
VScoder125-Jul-15 23:32
memberVScoder125-Jul-15 23:32 
SuggestionRe: visual studio 2010 error help needed Pin
Richard MacCutchan6-Jul-15 0:07
protectorRichard MacCutchan6-Jul-15 0:07 
GeneralRe: visual studio 2010 error help needed Pin
VScoder126-Jul-15 15:45
memberVScoder126-Jul-15 15:45 
GeneralRe: visual studio 2010 error help needed Pin
Richard MacCutchan6-Jul-15 21:46
protectorRichard MacCutchan6-Jul-15 21:46 
GeneralRe: visual studio 2010 error help needed Pin
VScoder126-Jul-15 23:29
memberVScoder126-Jul-15 23:29 
GeneralRe: visual studio 2010 error help needed Pin
Richard MacCutchan6-Jul-15 23:35
protectorRichard MacCutchan6-Jul-15 23:35 
GeneralRe: visual studio 2010 error help needed Pin
VScoder127-Jul-15 1:34
memberVScoder127-Jul-15 1:34 
GeneralRe: visual studio 2010 error help needed Pin
Richard MacCutchan7-Jul-15 1:56
protectorRichard MacCutchan7-Jul-15 1:56 
VScoder12 wrote:
any suggestion?
Not really. I have just created a new Windows Forms application using Visual C++ 2010 Express, and it creates the correct files, and compiles without error. I can only assume that something is missing from your Visula Studio setup that causes these errors. The generated code of the two main files is as follows, you could try it in your system.:
// Form1.h 
#pragma once

namespace WinForm {

    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:
        /// <summary>
        /// Required designer variable.
        /// </summary>
        System::ComponentModel::Container ^components;
        
        #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->Size = System::Drawing::Size(300,300);
            this->Text = L"Form1";
            this->Padding = System::Windows::Forms::Padding(0);
            this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
        }
    #pragma endregion
    };
}


// WinForm.cpp : main project file.

#include "stdafx.h"
#include "Form1.h"

using namespace WinForm;

[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
    // Enabling Windows XP visual effects before any controls are created
    Application::EnableVisualStyles();
    Application::SetCompatibleTextRenderingDefault(false); 
    
    // Create the main window and run it
    Application::Run(gcnew Form1());
    return 0;
}

GeneralRe: visual studio 2010 error help needed Pin
VScoder127-Jul-15 16:11
memberVScoder127-Jul-15 16:11 
GeneralRe: visual studio 2010 error help needed Pin
Brisingr Aerowing7-Jul-15 17:29
professionalBrisingr Aerowing7-Jul-15 17:29 
GeneralRe: visual studio 2010 error help needed Pin
Richard MacCutchan7-Jul-15 22:58
protectorRichard MacCutchan7-Jul-15 22:58 
GeneralRe: visual studio 2010 error help needed Pin
Brisingr Aerowing8-Jul-15 3:23
professionalBrisingr Aerowing8-Jul-15 3:23 
GeneralRe: visual studio 2010 error help needed Pin
Richard MacCutchan8-Jul-15 3:26
protectorRichard MacCutchan8-Jul-15 3:26 
GeneralMessage Closed Pin
29-Sep-15 3:45
memberHighClassAsianEscort29-Sep-15 3:45 
QuestionMFC multi languages UI question Pin
econy26-Jun-15 3:34
memberecony26-Jun-15 3:34 
AnswerRe: MFC multi languages UI question Pin
Albert Holguin26-Jun-15 10:55
professionalAlbert Holguin26-Jun-15 10:55 
Questionuser32!IsWindow crash Pin
yu-jian2-Jun-15 0:42
groupyu-jian2-Jun-15 0:42 
AnswerRe: user32!IsWindow crash Pin
Richard MacCutchan2-Jun-15 5:13
protectorRichard MacCutchan2-Jun-15 5:13 
AnswerRe: user32!IsWindow crash Pin
Bernhard Hiller3-Jun-15 3:14
memberBernhard Hiller3-Jun-15 3:14 
QuestionVS skips $include "stdafx.h" Pin
bkelly131-Jun-15 9:38
memberbkelly131-Jun-15 9:38 
AnswerRe: VS skips $include "stdafx.h" Pin
Richard Andrew x641-Jun-15 12:55
professionalRichard Andrew x641-Jun-15 12:55 
GeneralRe: VS skips $include "stdafx.h" Pin
bkelly131-Jun-15 13:17
memberbkelly131-Jun-15 13:17 
AnswerRe: VS skips $include "stdafx.h" Pin
peterchen12-Aug-15 12:52
memberpeterchen12-Aug-15 12:52 
QuestionC++ 11 std::unique_ptr related compiling error Pin
Falconapollo28-May-15 17:27
memberFalconapollo28-May-15 17:27 
QuestionRe: C++ 11 std::unique_ptr related compiling error Pin
yufengzjj2-Jun-15 4:19
memberyufengzjj2-Jun-15 4:19 

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.