All,
I have been moving from developing in C# to C++. So far it has been very productive but I am still having issues when trying to convert so of my functions. The biggest issues has been visualizing the conversion of the C# to C++. At times
I am not evening trying to convert but to rewrite, but I am still having problems. Below is the intial code I wrote to open the folder.
FolderPicker^ folderPicker = ref new FolderPicker();
folderPicker->SuggestedStartLocation = PickerLocationId::Desktop;
create_task(folderPicker->PickSingleFolderAsync()).then([this](StorageFolder^ folder)
{
if (folder)
{
}
else
{
}
});
Below is my C# code to load the .jpg files into a bit map image to display on a flipview.
var queryOptions = new QueryOptions(CommonFileQuery.DefaultQuery, new[] { ".jpg" });
var query = folder.CreateFileQueryWithOptions(queryOptions);
var files = await query.GetFilesAsync();
foreach (var f in files)
{
BitmapImage bmp = new BitmapImage();
bmp.SetSource(await f.OpenAsync(FileAccessMode.Read));
myImages.Add(bmp);
}
I hope someone can help find a jumping off point so I can continue.
Thanks
Grim