Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Extremely basic ? about VS 2005.

Extremely basic ? about VS 2005.

Scheduled Pinned Locked Moved C / C++ / MFC
c++visual-studiowinformsquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    David Fleming
    wrote on last edited by
    #1

    I am currently familiar w/ VC 6.0. I downloaded the trial of VS 2005 Express (just C++) to try out. I created a new "Windows Forms App" and added a couple of controls. When I add an event handler (such as _Click for a button), the IDE creates the entry in the .h file, but I don't see a .cpp file. Here's what's in the .h file:

    private: System::Void button1_Click(....

    I don't think I am now supposed to put my code in the .h file, so... 1) am I supposed to create the .cpp file myself? or 2) did I miss something such that the .cpp file did not get created when it should have? I know this is really simplistic, and I feel like I'm just overlooking something, but some advice to point me in the right direction would be nice. Thanks. PS: One other simple thing. I figured out the following to do a simple MessageBox:

    System::Windows::Forms::MessageBox::Show("Button pressed!");

    Surely there's a shorter way...! Thanks again.

    S 1 Reply Last reply
    0
    • D David Fleming

      I am currently familiar w/ VC 6.0. I downloaded the trial of VS 2005 Express (just C++) to try out. I created a new "Windows Forms App" and added a couple of controls. When I add an event handler (such as _Click for a button), the IDE creates the entry in the .h file, but I don't see a .cpp file. Here's what's in the .h file:

      private: System::Void button1_Click(....

      I don't think I am now supposed to put my code in the .h file, so... 1) am I supposed to create the .cpp file myself? or 2) did I miss something such that the .cpp file did not get created when it should have? I know this is really simplistic, and I feel like I'm just overlooking something, but some advice to point me in the right direction would be nice. Thanks. PS: One other simple thing. I figured out the following to do a simple MessageBox:

      System::Windows::Forms::MessageBox::Show("Button pressed!");

      Surely there's a shorter way...! Thanks again.

      S Offline
      S Offline
      S Senthil Kumar
      wrote on last edited by
      #2

      This is the VC++ forum, your questions are about C++/CLI, for which there is the C++/CLI forum.

      David Fleming wrote:

      am I supposed to create the .cpp file myself?

      Guess so. I tried it and got the same result.

      David Fleming wrote:

      PS: One other simple thing. I figured out the following to do a simple MessageBox:

      Provided you have using namespace System::Windows::Forms in the translation unit, you can simply do MessageBox::Show(...) Regards Senthil _____________________________ My Blog | My Articles | WinMacro

      V 1 Reply Last reply
      0
      • S S Senthil Kumar

        This is the VC++ forum, your questions are about C++/CLI, for which there is the C++/CLI forum.

        David Fleming wrote:

        am I supposed to create the .cpp file myself?

        Guess so. I tried it and got the same result.

        David Fleming wrote:

        PS: One other simple thing. I figured out the following to do a simple MessageBox:

        Provided you have using namespace System::Windows::Forms in the translation unit, you can simply do MessageBox::Show(...) Regards Senthil _____________________________ My Blog | My Articles | WinMacro

        V Offline
        V Offline
        vikas amin
        wrote on last edited by
        #3

        Try in the CLI u might get the proper response as people here are yet on vc++:cool: Vikas Amin Embin Technology Bombay vikas.amin@embin.com

        L 1 Reply Last reply
        0
        • V vikas amin

          Try in the CLI u might get the proper response as people here are yet on vc++:cool: Vikas Amin Embin Technology Bombay vikas.amin@embin.com

          L Offline
          L Offline
          Lord Kixdemp
          wrote on last edited by
          #4

          Crap! I thought CLI was for regular (non-Visual) C++... where's that then? :~ Thanks! ;-) BTW, David, I don't know how to do it in C++, but in C# you used: using System.Windows.Forms; It should be quite similar... ;) Lord Kixdemp www.SulfurMidis.com www.SulfurSoft.tk [ftp://][http://][hotline://]tsfc.ath.cx

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups