visual-studio-2012

How to include libraries in Visual Studio 2012?

守給你的承諾、 提交于 2019-12-25 02:05:09
问题 I started with learning C++ a few days ago and I would like to get some data to make it more funny. I found a powerful C++ library called Unirest that can help me to get data from many APIs and after practice the basics :) I don't know how to include libraries into my project. I fond some videos about how to do it so I just created libs folder (like i always do when I'm programming in PHP) and I copied library files. After I included header file UNIRest.h into my source and added the libs

DataTemplate.DataTriggers not found?

别等时光非礼了梦想. 提交于 2019-12-25 01:58:58
问题 A pretty strange thing happens when trying to use DataTemplate.DataTriggers in my XAML for Windows 8 Metro app. In my App.xaml, I am defining template for my data. I'd like to use the DataTriggers, but when I type it my VS2012 editor, I get errors stating that The attachable property 'DataTriggers' was not found in type 'DataTemplate'. and The member "DataTriggers" is not recognized or is not accessible. A similar issue happens when I try to set the DataType property for DataTemplate: The

How to install .NET4.0, .NET4.5, x86, AnyCPU DLLs side by side in Visual Studio Reference Manager

只愿长相守 提交于 2019-12-25 01:53:45
问题 Related to this question here, I am trying to create an installer which installs DLLs on the target user's PC and makes them available to the Visual Studio Reference Manager (Project > Add References) I have figured out that to make an assembly visible to the .NET4.0 Reference Manager, I need to add this Registry Key Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\MyAsm Value: <Directory on target PC of .NET4.0 assembly> And for .NET4.5, I need this key

How to use basic http authentication on Windows rt- Visual Studio 2012 - C#

扶醉桌前 提交于 2019-12-25 01:46:59
问题 how can i use basic http Authentication for a HTTPS URL Windows 8 Store App. I am using Visual Studio 2012, C# and XAML. Is there any point to keep attention when i use an HTTPS URL? i have tried these following methods: #1 : ###Code is UPDATED - Final running solution private async void HttpClientCall(object sender, RoutedEventArgs e) { System.Diagnostics.Debug.WriteLine(this.GetType().Name + ": HTTPCLientCall entered"); //System.Diagnostics.Debug.WriteLine("NetworkConnectivityLevel

How to add checkbox to datagrid in vb.net

烂漫一生 提交于 2019-12-25 01:35:26
问题 I have a datagrid with a set of columns showing data from a database. I create the datatable and add it to the datagrid and then bind the source. this works great and now I would like to add a column to the front of the grid that has checkbox in it. Do I add the checkbox when I am adding the new row to the datatable that is shown in the datagrid or after I databind the datatable to the datagrid? Using: VB.Net, Visual Studio 2012 回答1: you can add checkbox using template field Set

Visual Studio 2012 Fatal error 0x80131c39

狂风中的少年 提交于 2019-12-25 01:35:18
问题 I am going bloody insane, I have installed a different type of Windows 8 (pro) at work, and now VS12 gives me this error. At home I have home edition W8 and everything works fine. I found ONLY ONE PERSON encountering this error EVER in Google, and he solved this by switching to .Net 3.5. But I am running an XNA 4.0 game (with a hack to make it work on VS12) and I don't have this option. Has anyone else EVER encountered something like this? 来源: https://stackoverflow.com/questions/16730550

T4 - Error 60: A field initializer cannot reference the non-static field, method, or property

两盒软妹~` 提交于 2019-12-24 23:24:24
问题 I try to use the solution from Microsoft documentation. At the beginning of my .tt file I put: <#@ template language="C#" hostSpecific="True" #> <#@ output extension="cs" #> <#@ import namespace="System.IO" #> Then I try to get some variables from my previosly transformed file: <#+ string myFile = File.ReadAllText(Host.ResolvePath("AssemblyInfo1.cs")); #> In the line above I get error. If the line is commented everything is OK. Error output is: Error 60: A field initializer cannot reference

Unresolved Externals in C++: Visual C++ mangles method signature differently from mangled method in dll

给你一囗甜甜゛ 提交于 2019-12-24 23:18:01
问题 I'm using Visual Studio 2012, managed C++, to make a bridge between a third party SDK and our system which is written in C#. I have succesfully wrapped and consumed several functions from said SDK. Except one, which only result in a Unresolved External Error. The SDK's header file defines the function's signature: #if defined WIN32 #if defined BUILD_ADS_SHARED_LIB #define ADS_LINK_SPEC __declspec (dllexport) #define ADS_CALLING_CONVENTION __stdcall #elif defined USE_ADS_SHARED_LIB #define ADS

strncpy and strcat not working the way I think they would c++

扶醉桌前 提交于 2019-12-24 22:38:34
问题 I have an assignment to implement a string object ourselves, and am currently stuck when trying to concatenate two such strings. I figured I would go this route: allocate big enough space to hold insert beginning of holding string into new space up to index using strncpy(this part works) cat on the string I am inserting cat on the remainder of the holding string Implementation: #include <iostream> #include <cstring> using namespace std; int main(){ int index = 6;//insertion position char *

c++ Covariance issue with pointer return issue

ε祈祈猫儿з 提交于 2019-12-24 21:07:41
问题 Since I had a lot of ambiguity in my post, I will redo it. This is a problem I am encountering in a project which I am upgrading from a visual studio 6.0 environment to a visual studio 2012 environment. I have a class which is derived from the followinh mfc class (CPropertyPage) which contains the following function. file is afxdlgs.h (mfc class) class CPropertyPage : public CDialog { public: virtual CPropertySheet *GetParentSheet(); } I also still seem to have the problem after changing the