visual-studio-2012

ListView KeyUp Error for the Control Key

好久不见. 提交于 2019-12-29 02:07:08
问题 ListView.KeyDown <Ctrl> event shows the following: e KeyData = LButton | ShiftKey | Control base {KeyData = LButton | ShiftKey | Control} Alt false bool Control true bool Handled false bool KeyCode LButton | ShiftKey KeyData LButton | ShiftKey | Control KeyValue 17 Modifiers Shift false bool SuppressKeyPress false bool I don't like the fact that the <ShiftKey> is showing up but the Control key is showing up. On ListView.KeyUp <Ctrl> event shows the following: - e {KeyData = LButton | ShiftKey

boost serialization of native type defined with typedef contained within struct

别来无恙 提交于 2019-12-29 02:06:27
问题 I have a MyFile.hpp header file which contains various types and enums. How do i do serialization/ desrialization of given example code. //MyFile.hpp namespace A { namespace B { typedef std::string MyString; typedef std::map<std::string,std::string> my_type; typedef bool result; struct MyTimer { int time; private : friend class boost::serialization::access; template<class Archive> void serialize(Archive &ar, const unsigned int version) { ar & time; } }; enum MODE { Sleep=1, HybridSleep,

Visual Studio Coded UI test won't run - startup object empty

ⅰ亾dé卋堺 提交于 2019-12-29 01:50:09
问题 Created a recorded Coded UI test - it worked fine but won't run today. Error: "A project with an Output Type of Class Library cannot be started directly. In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project." Googled and made sure this test is setup as startup project. However, when I go to the properties of the project, "Startup object" under Application tab is set to "(Not set)".

Is there a bug with extern template in Visual C++?

心已入冬 提交于 2019-12-28 13:56:08
问题 Given this code: //header.h template <class T> class Foo { public: Foo(T t) : t(t) {} T t; }; //source1.cpp: #include "header.h" extern template class Foo<int>; int main() { Foo<int> f(42); } By my understanding, this program should not link, since there should be no definition of class Foo<int> anywhere ( extern template should prevent this). With VC++ 11 (Visual Studio 2012), this does however compile and link. In GCC, it doesn't: source1.cpp:(.text+0x15): undefined reference to `Foo<int>:

debugging with visual studio using redirected standard input

时光总嘲笑我的痴心妄想 提交于 2019-12-28 11:56:36
问题 I am debugging c++ console application with Visual studio. I exhausted of inserting the same input every time I debug this program. I would like to use the same input more times. I do this without debugging in command line with command: Program.exe < 1.in Is it possible to use debugging with standard input redirected from file??? I already tried looking in to procejt properties. I tried setting Command to $(TargetPath) < 1.in instead of $(TargetPath). I also tried setting Command Arguments to

How to get a right click mouse event? Changing EventArgs to MouseEventArgs causes an error in Form1Designer?

杀马特。学长 韩版系。学妹 提交于 2019-12-28 06:17:08
问题 I have a method to detect the left click event that visual studio made by double clicking on the form. private void pictureBox1_Click(object sender, EventArgs e) { MessageBox.Show("Left click"); } I want to have a right-click event by right-clicking on the same object. I read online that you can use this switch: private void pictureBox1_Click(object sender, EventArgs e) { if (e.Button == System.Windows.Forms.MouseButtons.Right){MessageBox.Show("Right click");} if (e.Button == System.Windows

Visual Studio 2013: CL.exe exited with code -1073741515

…衆ロ難τιáo~ 提交于 2019-12-28 06:00:33
问题 I have a fresh Windows 8.1 Pro x64 install with a fresh Visual Studio 2013 Pro. When trying to compile a project with Platform Toolset to Windows7.1SDK I'm getting Error 1 error MSB6006: "CL.exe" exited with code -1073741515. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.targets 57 5 MenuBrowser I tried running the supplied "Windows SDK Configuration Tool" and besides getting an error about Visual Studio 2005 and 2008 not being installed I think it did

How do I use visual studio 2012 dark theme with windows 8 high contrast theme?

早过忘川 提交于 2019-12-28 05:34:04
问题 When I use a standard Windows aero theme in Windows 8, the VS2012 lets me to choose between light and dark themes, but I created myself a convenient high contrast theme in Windows 8, and now there is only a greyed option in the VS settings that says "high contrast", and I cannot change it. I belong to the few people, who like the new dark theme of Visual Studio, but unfortunately I can't use it with the new high contrast Windows themes. Can someone help me with this one? 回答1: My colleague

How to execute a PowerShell script only before a web deploy Publish task in VS 2012?

允我心安 提交于 2019-12-28 05:21:30
问题 Currently I have a post-build event configured in my web project using Visual Studio 2012 like this: This basically calls a PowerShell script to add a copyright notice to every .cs file. What I'd like to do is to execute this powershell script only before Publishing the web app to the remote server. Doing so I won't experience a delay every time I need to debug the project. Do you know of any way of accomplishing this? According to Sayed's answer, I customized a specific publish profile and

How to include OpenSSL in Visual Studio

。_饼干妹妹 提交于 2019-12-28 03:10:11
问题 I am having a hard time trying to add openssl to my project. I have downloaded the precompiled installer for windows, and I have the libraries installed, but I can't find a way to include openssl in my project. Note: I am using Visual Studio Expres 2012 on Windows 7 x64, but it's not restricted to that environment. 回答1: Let's assume you have installed OpenSSL in a folder like: "C:\Program Files\Openssl-Win32-1.0.1p....." (or whatever other name); I am going to refer to that as OPENSSL_INSTALL