Disabling clipboard ring in MSVC 2012 - c++

I use ClipX on my computer to keep a clipboard history, and it works just fine. After I upgraded to MSVC2012, however, it no longer picks up any of the copies I do inside Visual Studio. It seems that Visual Studio is somehow catching the CTRL+C before ClipX is, or something? Anyway, I prefer ClipX to MS's implementation, so I was hoping there was some way to just completely disable that functionality

Are you running the latest version of ClipX available? Even though it's labeled "Beta", version 1.0.3.9 works well, and if you're on Win7 x64 there's a 64-bit version available, which is what I run. I'm not running Windows 8 or 8.1 yet so cannot comment on whether it works with those.
I'm running VS2013, and I cannot reproduce your problem exactly, but... I do have a similar problem (and solution):
I run VS as administrator (I change the properties of devenv.exe to always run as admin) for interop with IIS, among other reasons. ClipX still picks up the values from copies/cuts, but when I try to use the ClipX popup list to paste a value other than the current clipboard entry, it doesn't actually paste into Visual Studio. ClipX does move the item to the top of the list, and a second Ctrl+V does then paste the value into VS, but it's very annoying.
The solution is to run ClipX as administrator also. Since running a program as admin at startup/login is only possible through Task Scheduler, this is a bit of a pain to set up, but once I've set it up, ClipX has no problem interacting with VS (or any other program I run as admin).
If you are running VS as admin you could try running ClipX as admin (just right-click it in the Start menu) and see if it fixes your problem. If so, then worry about the Task Scheduler part. If it doesn't fix your problem, then well, it was worth a shot.

Related

Visual Studio 2017 Invisible Breakpoints on the Breakpoint Bar

My Visualstudio 2017 Breakpoints are invisible, which means they appear in the submenu.
My application stops by hitting each breakpoint correctly.
I'm able to set and delete Brakpoints via the sidebar next to the line bar.
Breakpoints can be controlled by rightclick them and the submenü will open
BUT:
They wont appear. Setting a breakpoint in the bar only left a grey bar behind as there is no breakpoint.
So far I tried:
Reinstall vs 2017 7 times
Deinstalling all plugins and similar stuff (visual assist, Qt etc.)
Delete every project
Delete every %appdata% stuff
Delete registry data for vs
Tryed (I hope) everything in Debug config and vs settings
Installed it on my laptop using also intel Windows 10 etc. (there it workes, but I still need it on my pc)
Solution:
(System: Win-10)
(VisualStudioversion: 17/19)
Check if there is a breakpoint.png on your computer (if this is missing, this solution wont work). (Search in Windows explorer and enable to see all file and search trough everything filename, file etc. [enable this in the settings])
Create Win10 .iso with the offered tool from Microsoft here and store it on the desktop.
Execute this .iso and press install Windows. [Dont forget to cross the right checkbox to keep your data and just replace all your windows files]
!Some settings will be gone after new installation as they inherited by the system! (but most things will stay)
After finishing the (re)installation just start vs 17/19 and the Breakpoint should work now or better should be visible breakpoints. :D
Note: I tried a lot of things including a huge amount of testing, checking etc.. This solution should work, but there is the possibility, that I fixed the issue with some other test or stuff I've done. Though there is no guarantee that this will work, but if it doesn't work, just leave a comment and I can try to remember what I've done along my solution process.

VS2017 Installer Project - Cannot Make Uninstaller

I have been able to successfully install a simple program using an Installer Project on Visual Studio Community 2017. However, I can't find out how to create a fully working deployable uninstaller for an end user.
The Installer Project was set up to only create an Application Folder (in C:\Program Files...) with the Program .exe, and nothing else. This it does successfully. I would like an installer because later I plan to make some registry keys upon installation.
To test uninstallation, I have run the original .exe file built by the Installer Project with the "Uninstall" option. This removes the Application Folder but does not remove the program from the Add/remove programs list in Windows - Leading me to believe there are other registry entries that have not been removed.
I have tried to uninstall purely from the Add/remove programs list, but then I get an error:
C:\WINDOWS\system32\msiexec.exe
"Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item."
In Visual Studio, I can click "Uninstall" from the Installer Project right-click menu which does successfully remove both the Application Folder and the Add/Remove Programs Item, but this is not a deployable solution.
Notes:
OS: Windows 10
Using Visual Studio 2017 Community
Looking at the application Folder, there is neither an install nor uninstall .exe file in it. The Installer Project .exe is only in the original build location, and I cannot find how to get a copy in the Application Folder (not sure if a copy there would work).
I have tried configuring the Installer Project as x86 and x64 with no change.
I have tried using both Debug and Release build configurations with no change.
From looking around, WiX seems to have more features and flexibility, but I haven't yet dug into that. Is there an easier solution?
Has this issue occurred to anyone else? My hopes were that Installer Projects were the simple way to learn and handle installation.
Looks like I jumped to conclusions in the comment above, however I think I found the issue: I cannot uninstall the program from the Windows Apps & Features window in System Settings, but uninstalling from Control Panel\Programs\Programs and Features works fine.
When typing in "Remove" using the windows start button, the default item that comes up is "Add or Remove Programs" in System settings (This looks like a Windows 10 thing). When you click that, it forwards you to the "Apps & features window. I am now learning that for some reason this has different functionality than the control panel window. Or maybe it has lower permissions, although I am the admin and only user of this computer...
Because it can be uninstalled from Control Panel, I think this would be the preferred solution. My assumptions about the other window in system settings was my real issue. I just wish the Apps & features window aligned its functionality/permissions with control panel.
I also learned that uninstall is successful when I run msiexec.ex /I{PACKAGEID} in cmd. Not sure how relevant this is, but documenting here.
Installs and uninstalls are transactional, they either work completely or roll back completely. If you do an uninstall but the entry remains in Add/Remove Programs then it's likely that the uninstall did not in fact work.
When you do the install, if it has a UAC elevation dialog then the install is running with elevation and installing files/registry entries to locations prohibited to limited users. Removing files from those locations also requires elevation. You haven't said exactly how your uninstall works, but most likely it requires elevation to succeed, and your program isn't running elevated. If your program uninstalls silently the uninstall will fail silently, so it's possible that your program isn't actually checking that the uninstall worked.
I'd also guess that your Visual Studio session may be running elevated so uninstall from there works fine.
Apart from privileges, an uninstall from a running installed program tends not to work very well because the uninstall process cannot remove your running program or its folder because it's in use. So while you could get it to work (with elevation) you might find that your program and its folder are left behind until the next reboot. If people really want to do this, one of the strategies is to copy an uninstall program to the temp folder and fire it off asynchronously, so everything can be removed.
Uninstalls from Add/Remove Programs&Features generally work fine. Without some context that error message doesn't mean much. It's not a message that comes out of Windows Installer, so it's perhaps coming out of a custom action. Otherwise it may be an issue specific to the test machine.
There is never an uninstall exe in a Windows Installer setup. When you remove a product the system just calls the Windows API to remove the product. Windows Installer is part of the Windows OS with API support for everything that needs doing. Only non-MSI setups require an install and uninstall exe to do anything.
None of these issues seem to be related to your choice of tool. They all create MSI files and if an MSI design is not optimal it doesn't matter what tool you use. There's nothing wrong with WiX, but to install literally a few files it's overkill compared to Visual Studio.

VS2010 Intellisense problems

This question actually is an implicit answer, since I could fix the problem in the meantime for myself. But I wanted to publish my experience, since some other developers might have a similar problems.
The problem:
I am using VS2010 prof SP1 on Windows XP SP3, pure C++ only. (AntiVirus software present).
Since some days Intellisense - which is quite helpful under normal conditions - does not work anymore.
Things tried:
created a new simple console application. -> Intellisense still not working.
resetting VS-Settings by means of Tools/Import & Export Settings/Reset. -> Intellisense still not working
Changes to option settings in Text-Editor/C++/Advanced inclusive logging did not help.
-> Intellisense still not working
There was actually an interesting observation:
Intellisense normally creates a directory 'ipch' in the solution directory to store intermediate files. In my solution folders it disappeared as soon as the solution was opened. When I created a folder 'ipch' and opened the solution Intellisense removed the folder again - strange.
The final fix:
During the last week some new Windows updates were installed. I noticed some other unusual behaviour of my PC as well. After having created an image of my PC, I decided to
uninstall Windows updates from 2013-09-11 (4 packages) and one update from 2013-08-28.
(unfortunately I did not note down the KB-numbers)
AND: out of a sudden Intellisense is working again !
Maybe this report could be helpful for some other persons.
Automatic Updates are now disabled on my PCs.
Confirmed 100%
Microsoft Visual Studio 2010 Version 10.0.30319.1 RTMRel
Microsoft NET framework 4.0.30319 RTMRel
Microsoft Windows XP Professional Version 2002 Service Pack 3
Intellisense stops working after installing KB2876217.
Intellisense is back after removing update.
I had the same problem and also had the idea that one of the Windows Updates is buggy, so I can confirm your report.
I tried to uninstall them one-b<-one and found the "bad guy":
KB2876217 destroys intellisense for VS2010 under XP SP3.
A supported hotfix is available from Microsoft to fix this issue. Check at http://support.microsoft.com/kb/2526044/en-us
Actually, it may not be such a good idea to uninstall update KB2876217. Instead, install Visual Studio SP1 update (if not already installed) and then install update KB2526044. I have tried it before and it does work...

How to make a c++ project run on a different PCs

I developed a small c++ program in Visual Studio 2012 on Windows7, 64bit (let's call it PC1). On that pc it runs fine!
Since I didn't have a versioning control system like SVN at hand, I copied ALL the project data (the exact folder structure, DLLs, source files, project files...) to a usb stick and moved it to another computer.
On that other engine there's Visual Studio 2010 on Windows7, 64bit (PC2).
So I just changed the platform toolset to v100 as described here.
I successfully compiled the project on PC2 (clean, build) and wanted to run the exe, but the command prompt stayed empty.
I then tried to debug and added a breakpoint at the very first line of main - which wasn't reached, the command prompt was still empty.
Ok, a usb stick is certainly not the most secure solution for data storage, so I gave it another try and moved it again - the problem remains.
Visual Studio's output on PC2 is the same as on PC1, so I couldn't find any anomalies there.
Yeah, there might be many error sources, so where can I start?
And how can I get a more verbose output for troubleshooting?
Or is this even a common phenomenon (perhaps due to different VS versions) and there's an simple way fix it?
This is not a full solution, but at least I'm a tiny step ahead:
In my last comment I wrote:
I took your advices into account and created a brand new project on PC2, VS2010. I exactly followed this guide: http://frozenhamster.wordpress.com/2011/02/11/lapack-on-windows-with-visual-studion-2010/
That didn't work either, so I removed I "out-commented" everything except for a single cout. Voila, that worked!
But as soon as I make use of the desired Armadillo (LAPACK and BLAS), the project compils but does not run.
What's going wrong here?
I don't get any compiler errors!

MFC Ribbon app not displaying ribbon - when .exe is copy pasted to a different machine

Well, I am facing a strange problem. I have developed a sample MFC ribbon application on my machine - Windows 7 , with Visual Studio 2008. When I copy paste the .exe onto my laptop and run the app , I don't see the ribbon menu (in fact the app has not menu now) .
I have tried looking up the .dll that load in each case(on my work machine and laptop) using process monitor but I am unable to locate what I might be missing. Any help will be greatly appreciated.
Edit 1 -
Ok, So thanks for your responses. Some progress has been made with this issue
I changed my IDE to VS 2010. The ribbon was coded manually and I figured out if I could add it as a resource maybe the problem would be solved. VS 2008 did not have the option of adding a ribbon as a resource.
I installed the VS 2010 Service Pack Redistributable X86/X64 depending on whether the machine is 32 or 64 bit.
I built a new "ribbontest.exe" app from VS 2010 and deployed it on other machines on which I would test my actual app. The ribbon for "ribbontest.exe" loads without any problems.
When I deploy my app and run it, first the old menubar loads for a sec or two, then the ribbon flashes and disappears.
A little history of the app I am referring to -
Initially my application had the menubar view. I followed this article http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c14929/MFC-Feature-Pack-An-Introduction.htm to accommodate a ribbon.
Any suggestions?
Most likely there's a conflict in the settings 'paths'. In your InitInstance() handler, you've got a statement like this:
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need
// Change the registry key under which our settings are stored
SetRegistryKey(_T("yourappname"));
If you haven't changed that name yet, do it. If you did, open regedit.exe on your target machine and remove the whole key under HKCU\Software\yourappname and then try again.
MFC stores user customizations of Ribbons/Menus/... under that key. But if you changed your app those settings don't necessarily match anymore and you can end up with stuff not showing correctly or not at all.
Make sure you download and install the Visual C++ Redistributable Runtime on your destination machine: http://www.microsoft.com/en-us/download/details.aspx?id=29
Or, something like it. Make sure you have architecture (x86/x64) correct and make sure it matches with the service pack version you compile with.
Joe is right: you need redistributable.
Joe is right: you cannot run 64-bit program on 32-bit machine.
All of the above would be indicated by the system (missing DLL, configuration incorrect, or 64/32 bit discrepancy)
Joe is right: your application must be built for specific set of minimum Windows version and service pack.
In addition to Joe’s post you must run release build not debug build.
If all of those requirements are met and you still have this problem, try linking MFC statically and see if problem persists.