0

I am attempting to use winrt-rs from:

[https://github.com/microsoft/winrt-rs][1]

But, I have no experience with winrt and other than the example (minesweeper) there is not a lot of information out there (that I've been able to find). So, I'm trying to see how I can properly navigate this. I downloaded the repository, but it doesn't seem to actually show the modules and how they're written. Plus, when writing I don't seem to get intellisense or documentation examples.

So, as an example, I am attempting to do a MessageDialog. I have found the following line to work:

use windows::ui::popups::MessageDialog;

With this line, compilation is successful. But, I can't seem to find out how to create a new dialog.

let md = MessageDialog("test");

This errors saying,

^^^^^^^^^^^^^ did you mean MessageDialog { /* fields */ }?

So, I tried to use 'new':

let md = MessageDialog::new("Test");

But this gives another error:

^^^ function or associated item not found in windows::ui::popups::MessageDialog

As the question implies, the real question here isn't how to create a MessageDialog. Instead, I want to know where information for winrt modules would be found.

STF_ZBR
  • 617
  • 1
  • 4
  • 19
  • 1
    You can run `cargo doc --open` in your project directory. That will generate the documentation for your crate and your dependencies and open it in your Web browser. (You don't have to actually use the dependencies, so long as they're mentioned in `Cargo.toml`.) – Francis Gagné May 28 '20 at 18:01
  • That is awesome! Thank you, please post as an answer. – STF_ZBR May 28 '20 at 20:05

0 Answers0