Hi
I am happy to announce an upcoming book on C++ /Cx and Metro style app development. This book is currently in the works and will be published by Microsoft Press. I present a brief list of topics that are covered in the book.
1. Windows Runtime, WRL and writing apps using WRL.
2. C++ /Cx and C++ 11 features.
3. XAML and C++ /Cx (includes discussion on XAML plus DirectX)
4. Incorporating C++ AMP in Metro style apps.
5. Building WinRT components using C++ /Cx
6. Unit Testing support for C++ in VS 2011.
C++ 11 is new; C++ /Cx is new and so is WinRT. I am super excited to work on these technologies and author a book. Stay tuned for more!!
Enjoy!
Hurry up. I need this book starting yesterday 🙂
@dotMorten I am trying my best 🙂 Stay tuned for announcements on deliverables and timelines. In the mean time, feel free to ask questions.
Great, I sure could use such a book today. I like your Hello World too.
If I have a piece of XAML like
and I want to recreate it in C++, I can do
auto dynPolyLine = ref new Windows::UI::Xaml::Shapes::PolyLine();
but how do I implement the Stroke portion?
More generally, what method and documentation should I use to translate the XAML into runtime C++?
@Andrew7Webb The XAML is lost in the comment. Can you please send me an email with the XAML part only and I will look into it?
I put the XAML into a question at
http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/28d54a6f-76bd-457f-8438-4b9ed00ed342
for all to see.
Can you try this and let me know if it works or not?
Windows::UI::Xaml::Style^ style = dynamic_cast(App::Current->Resources->Lookup(“BasicRichTextStyle”));
SetterBaseCollection^ coll = style->Setters;
Setter^ b = (Setter^)coll->GetAt(0);
myLine->Stroke = (Brush^)b->Value;
Stroke =”{StaticResource ApplicationTextBrush}”
was lost inside a Polyline
a one line solution to the question posted by @Andrew7Webb above is Media::Brush^ brush= dynamic_cast( App::Current->Resources->Lookup( “ApplicationTextBrush” ) );
Fantastic. If you’re looking for technical reviewers I’d love to help out.
@Tom I don’t know what the folks at Microsoft Press would decide about external reviewing. I would be glad to receive as much feedback as possible though. Will update this blog once the approach is finalized 🙂
I have been trying to get a a project solution running in which one project is based on the BlankPage template and contains XAML, and uses Windows::UI::Xaml… classes. The other project should be a library of some sort so that I can reuse functions in a third project. This library project will contain pure C++ functions, and also use Windows::UI::Xaml classes.
I’m not sure what template I should use and how I should configure the project. I tried to use the “Static library (Metro style apps)” template, and then configure C++ | General | Consume Windows Runtime Extension to Yes. Is that the right approach?
Yes, that should be sufficient to get you started. Are you facing any issues?
I am progressing with that approach once I went past this issue:
https://connect.microsoft.com/VisualStudio/feedback/details/745751/xaml-designer-crashes-on-one-project-but-not-another
Pingback: Sridhar Poduri's Blog on WinRT and C++ /Cx » Programming Windows 8 Applications using C++ /CX–An update on the book
Hello SridharPoduri Sir,
i am extremely sorry for what i am going to ask.
I am student and new to programming. is is possible to learn Metro Style Development using C++/CX From the Scratch ?
if Yes then Please Guide.
if No then tell me what prerequisites are.
Thank You.
You can learn C++ /CX by beginning with this link: http://msdn.microsoft.com/en-US/library/windows/apps/hh699871.aspx