使用C ++在WP8中创建MessageBox [英] Create MessageBox in WP8 with C++
问题描述
如何使用C ++ SDK在WindowsPhone8中创建消息框?感谢
How To Create A MessageBox In WindowsPhone8 With C++ SDK? Thanks
推荐答案
从此论坛的另一个线程复制:
Copied from another thread in this forum:
这里有几点想法.
1.创建一个新的C#线程,该线程调用C ++,然后从那里等待信号量或对象.当您想张贴一个消息框时,发出信号(提供所需的消息). C ++接收信号并返回(返回C#). 然后,C#线程调用调度程序线程中的MessageBox,然后将调用重复向下进行到C ++中,等待下一个信号.
1. Create a new C# thread that calls down into the C++, and from there waits on a semaphore or object. When you want to post a message box, signal it (providing the desired message). The C++ receives the signal and returns (back into C#). Then the C# thread invokes the MessageBox in the dispatcher thread, and then repeats the call down into C++, awaiting the next signal.
2.在Direct3D环境中合成MessageBox. Windows Phone 8没有内置Direct2D,但是您可以使用Windows Phone 8提供的帮助程序类. DirectX工具套件(DirectXTK),以实现UI(例如MessageBox).一个Channel9 Coding4Fun博客, 8年代的MarbleMazes 描述MarbleMaze如何使用它.
2. Synthesize a MessageBox in the Direct3D environment. Windows Phone 8 does not have built-in Direct2D, but you can use helper classes provided by the DirectX Tool Kit (DirectXTK) to implement UI such as a MessageBox. A Channel9 Coding4Fun Blog, MarbleMazes for the 8's describes how MarbleMaze uses it.
也许其他人也有想法;我希望C#/C ++边界主题会是一个流行的主题.
Perhaps others may have ideas too; I expect the C#/C++ boundary topic to be a popular one.
-马克
这篇关于使用C ++在WP8中创建MessageBox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!