c++-cx

How to set a background color of a control in windows 8 store application

允我心安 提交于 2019-12-25 06:39:18
问题 I am designing an application and had to instantiate controls via code. The problem is that I am unable to change the background color. I tried to look all over the internet, but no succes. I have contacted the Microsoft support service, but no succes either. I read that you normally change a color by using System.Color or System.ColorHelper. Both are not accesible in the application. So how to solve the following problem: TextBox^ txtID = ref new TextBox(); txtID->Background = ?; 回答1: I have

How to draw a circle with a radial gradient on the canvas?

孤者浪人 提交于 2019-12-25 05:04:23
问题 I need to draw a circle with a radial gradient on the canvas in my custom control (XAML). But Windows::UI::Xaml::Media contains LinearGradientBrush only. I know about design guids but my control requires so feature to the user can see the color gamma. Below that I need to get: P.S. I ask how to draw it at least programmaticaly without XAML. P.P.S. I know that I can draw a picture in some editor with radial gradient and after draw it on the canvas but it seems not good solution for the

How to draw a circle with a radial gradient on the canvas?

…衆ロ難τιáo~ 提交于 2019-12-25 05:03:12
问题 I need to draw a circle with a radial gradient on the canvas in my custom control (XAML). But Windows::UI::Xaml::Media contains LinearGradientBrush only. I know about design guids but my control requires so feature to the user can see the color gamma. Below that I need to get: P.S. I ask how to draw it at least programmaticaly without XAML. P.P.S. I know that I can draw a picture in some editor with radial gradient and after draw it on the canvas but it seems not good solution for the

Creating NV12 encoded video using windows media foundation

≯℡__Kan透↙ 提交于 2019-12-24 11:27:43
问题 I was learning to create video files with raw fixed colored images using Windows Media Foundation using this tutorial http://blogs.msdn.com/b/eternalcoding/archive/2013/03/06/developing-a-winrt-component-to-create-a-video-file-using-media-foundation.aspx I was able to create RGB encoded WMV video shown in the above link. But i need to create YUV encoded MP4 video in NV12 format from image. Since NV12 use (W x H x 3/2) bytes of memory buffer for each frame, i created (W x H x 3/2) bytes of

Socket.IO documentation for Windows 8 modern/metro app with MessageWebSocket

∥☆過路亽.° 提交于 2019-12-24 01:24:28
问题 Relating to a previous question I asked, I am building a Windows 8 c++ App that requires me to connect to a Node.js server running socket.io. Does socket.io use any sort of special protocol on top of websockets? When I just do a dry connection, I get an error "HTTP Invalid Response." I see a number of c++ websocket implementations, but I'm having a bit of a hard time trying to translate those concepts into the Windows 8 websocket implementation. 回答1: Check this implementation for windows

Windows Phone 8: access UI Dispatcher in C++ code

时光毁灭记忆、已成空白 提交于 2019-12-24 01:18:30
问题 I am working on an Windows Phone 8 Application that uses mixed C# for UI and C++ for the underlying backed. I have some instances where I need to run some C++ code on the UI dispatcher thread (IE GetGeopositionAsync()). I have tried a method of making a callback from C++ to C# that runs in the UI thread and then calls a C++ method and runs: auto window = Windows::UI::Core::CoreWindow::GetForCurrentThread(); However this is returning null. Is there any way for me to accomplish this? 回答1: I had

How to declare interface that inherits from IClosable/IDisposable

两盒软妹~` 提交于 2019-12-23 15:42:23
问题 After being told in this question that my preferred solution was impossible, I'm now trying to implement a workaround. Instead of declaring my interface that inherits from IClosable in C++/CX, I'm declaring it in raw IDL. But that doesn't seem to work either. I've created an IDL file FooSpace.idl containing import "inspectable.idl"; import "Windows.Foundation.idl"; namespace FooSpace { [uuid(01234567-89AB-CDEF-FEDC-BA9876543210)] [version(42)] interface Foo : IInspectable requires Windows

CoreWindow::GetCurrentForThread() always NULL

≡放荡痞女 提交于 2019-12-23 13:13:28
问题 I'm trying to get the CoreDispatcher in C++ on Windows Phone 8 so that I can submit work items to the UI thread Dispatcher so I can update UI elements on the UI thread. However, when I call CoreWindow::GetCurrentForThread() , I get NULL back. In the documentation it states that this is supported on WP8. As long as I'm getting NULL for the current Window, I can't get the current Dispatcher from it; does anyone know how to get the current Dispatcher on WP8? 回答1: CoreWindow::GetForCurrentThread(

Obtaining UI dispatcher in Windows phone 8

青春壹個敷衍的年華 提交于 2019-12-23 08:05:51
问题 I have been developing a Windows Phone application that consumes Windows Runtime component(WRC).A function accessed by a non-UI thread,needs to use a callback that access the Windows phone application. void WControlPointCallback::OnListChange(char *pFriendlyName) { // Callback function to access the UI pCallBack->AlertCaller("Message"); } At first without using the Dispatcher it threw Platform::AccessDeniedException . Then I referred to this, this and this. I tried to obtain the Dispatcher

Obtaining UI dispatcher in Windows phone 8

牧云@^-^@ 提交于 2019-12-23 08:05:15
问题 I have been developing a Windows Phone application that consumes Windows Runtime component(WRC).A function accessed by a non-UI thread,needs to use a callback that access the Windows phone application. void WControlPointCallback::OnListChange(char *pFriendlyName) { // Callback function to access the UI pCallBack->AlertCaller("Message"); } At first without using the Dispatcher it threw Platform::AccessDeniedException . Then I referred to this, this and this. I tried to obtain the Dispatcher