참고 링크 : https://www.bogotobogo.com/cplusplus/application_visual_studio_2013.php
The simplest UI program
  1. Select Visual C++ CLR and CLR Empty Project 
    and type in RandomNumberGenerator for the project name. The, OK.
  2. Project->Add New Item... 
    Select UI under Visual C++.
    Leave the Form name as given by default MyForm.h.
    Then, click Add

    MyForm.png


  3. We need to edit the MyForm.cpp file:
    #include "MyForm.h"
    
    using namespace System;
    using namespace System::Windows::Forms;
    
    
    [STAThread]
    void Main(array<String^>^ args)
    {
    	Application::EnableVisualStyles();
    	Application::SetCompatibleTextRenderingDefault(false);
    
    	RandomNumberGenerator::MyForm form;
    	Application::Run(%form);
    }
      
    The System namespace provides functions to work with UI controls.
  4. At the right-mouse click on RandomNumberGenerator, we get the Propertieswindow. 
    Configuration Properties->Linker->System
    Select Windows (/SUBSYSTEM:WINDOWS) for SubSystem.
    Advanced->Entry Point, type in Main.
    The, hit OK.
  5. Hit F5, then we will have to run result, the Form.


'개발' 카테고리의 다른 글

System::String을 wchar_t* 또는 char*로 변환  (0) 2018.11.28

+ Recent posts