FAQ Database Discussion Community


Are shared pointers necessary in continuation chains?

visual-c++,concurrency,task,c++-cx,ppl
I have a continuation chain using lambda expressions where one task assigns to a variable and the next task reads from that variable. Microsoft suggests using a shared_ptr to wrap the variable even when the variable is a reference-counted handle (^). Wouldn't a reference-counted handle increment its reference count when...

How to use RichEditBox to provide formatted text

xaml,windows-phone-8.1,winrt-xaml,c++-cx,richeditbox
According to Microsoft's Quickstart: adding text input and editing controls, I should use RichEditBox should I want to provide some kind of formatted text editor. Unfortunately, they have been so thrift in examples. The examples provided only shows how to load RTF files for displaying. It tells nothing of how...

Template specific constructor

c++,windows-runtime,c++-cx
I'm writing my own vector class and i got a problem. i defined my class as template,i have definition for each of the vector sizes and i want specific constructor for each of the vector sizes. here is the code: template<int size> ref class Vector { internal: Vector(int _x, int...

Xml serialization/deserialization in WinRT (Store application)

windows-runtime,windows-phone,c++-cx
I need to make a Windows Store application that exchanges xml serialized data over a TCP connection with a server. Since I need to use Direct3D rendering in the application I went for the c++/cx store application template however I ran into issues with xml serialization/deserialization. My usual approach in...

Asynchronous download with HttpClient: The text associated with this error code could not be found

windows-phone-8.1,c++-cx,windows-rt
I intend to use the following code to download a file. It works when WIFI is available; but when there is no Wifi, I expect to catch the exception raised in the previousTask.get(). Unfortunately, catch in my code doesn't seem to catch the exception. The exception is HRESULT:0x80072F30 The text...

Connecting Microsoft Band SDK Preview to C++ project

windows-runtime,windows-phone,c++-cx,windows-universal,microsoft-band
I have just downloaded the Microsoft Band SDK Preview and trying to connect it to my C++/CX Windows Universal App project. Nuget gives me an error below, any way I could use the SDK preview from C++ code? Install-Package : Could not install package 'Microsoft.Band 1.3.10219-preview'. You are trying to...

Incorrect Breakpoints Triggered with Property getters when Debugging Windows Store App with Release Configuration

windows-runtime,c++-cx
I'm noticing some odd behaviour when I'm debugging an app written in C++/CX in Release configuration. FYI in case it's relevant I'm using Visual Studio 2013 Community (Update 4). When I place a breakpoint on a some property getter such as Type1::Label::get() I'm noticing it seems to break when Type2::Label::get()...

Strange characters preceding and following HTML in HTTP request

http,c++-cx
Background I am building a custom HTTP parser in C++/CX using sockets. As such, I have full control over the entire HTTP request and response.   Request GET /posts/html-android-app?referrer=rss HTTP/1.1 Host: mixturatech.com Connection: close   Response HTTP/1.1 200 OK Date: Thu, 30 Apr 2015 04:44:59 GMT Server: Apache X-Powered-By: PHP/5.2.17...

Platform::Array^ to char* - conversion and memory

arrays,interop,c++-cx
I have a C code that I want to use in my Windows Store C# application. Not very good at C/C++ but can slam in few lines, so I have a problem and a question. One of the C source functions looks like: send_data(const char *data, size_t len) The wrapper...

Force redraw on ListView in windows store app

listview,windows-store-apps,c++-cx
I am using @Romasz 's answer from Alternating Colors of rows in ListView in Windows Phone 8.1 to give alternate background to ListView items. I change it in order to highlight the selected item, like this: <local:AlternateConverter CurrentList="{Binding ElementName=myList, Path=ItemsSource}" HighlightIndex="{Binding ElementName=myList, Path=SelectedIndex}" x:Key="AlternateConverter"/> Note: I removed the AlternateBrushes property...