Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.

السؤال How to use Metro style Direct3D in the unit test project?

  • Thursday, March 15, 2012 9:56 AM
     
     

    How to create CoreApplicationView and get CoreWindow object in the Metro style unit test project?

    Thanks a lot!


All Replies

  • Friday, March 16, 2012 2:48 AM
     
     

    TEST_METHOD(TestMethod1)
    {
           // TODO: Your test code here
          auto directAppSource = ref new DirectXAppSource();
          CoreApplication::Run(directAppSource);
    }

    ref class DirectXAppSource : Windows::ApplicationModel::Core::IFrameworkViewSource
    {
    public:
      virtual Windows::ApplicationModel::Core::IFrameworkView^ CreateView();
    };

    When run the testmethod, it will show "Message:Unhandled WinRT Exception:Platform::COMException".

    How to use Metro style Direct3D in the unit test project?