I have a custom application in C++ that has been used to successfully copy-and-paste an object from the application into MS Office 2003 and 2007 (Word, Excel and PowerPoint). The object opens in our own custom ActiveX control.
Now with Windows XP and PowerPoint 2010, nothing happens on the cut-and-paste. I have tried turning off the smart copy/paste to no avail. Copy/paste works with Word and Excel 2010.
Do you have tips on how to debug this?
Are you just pasting to PowerPoint or are you pasting to an object in PowerPoint? Word and Excel differ in that there is always a selection object (the cursor) - but PowerPoint doesn't have one unless you specifically specify one (if you do this manually, PowerPoint itself will create an object if nothing is selected)
Related
I've got a dgml file created in Visual Studio 2017 that contains a schema for a database.
We refer to this regularly in our team so I want to print it out.
How can I do this?
I've tried the File->Print menu, but it is grayed out.
Also I've tried using Edit->Copy Image, but when I paste it into a third party image editor (that can print) the resolution of the copied image is so low that I can't read the text.
My workaround for now is to use [Share] [Export to Portable XPS...], then print the XPS document.
It doesn't work for complex DGML files, though. I sent a bug report to Visual Studio Developer Community. Feel free to upvote there.
Assume we have the huge Visual Studio solution and there are many files (tabs) opened. Does Visual Studio 2012 (Visual C++ particularly) have any View panel which will show the interactive list of objects from the current file when I switch to the corresponding tab? Or maybe there is an official extension which will help me? The standart Object Browser is not exactly what I want, because I'd like to see the list of all objects from the current file and only them.
Thanks!
Edit: I mean the list of all classes, structures, variables, methods etc., no matter declared or only defined in this file.
Did you try Visual-Assist extension? It might be helpful.
http://www.wholetomato.com/default.asp
Use Object Browser.
The Object Browser lets you select and examine the namespaces, classes, methods, and other programming symbols available for use in your project. You can open the Object Browser from the View menu, by clicking the Object Browser button on the main toolbar, or by typing CTRL+ALT+J. It will work for VS2005, VS2008, VS2010 and VS2012. Check out here for more info.
EDIT: If you want to see a so-called global tree view. I only know this works for WPF projects. You can use the WPF Tree visualizer to explore the visual tree of a WPF object, and to view the WPF dependency properties for the objects that are contained in that tree. For more information about visual trees, see Trees in WPF. For more information about dependency properties, see Dependency Properties Overview. Check out here.
I'm new to visual studios and I just created this very short calculator and I want to put it on mediafire for people to download but I wanted to change the icon..
I've heard that you select your app in solution explorer and Project>Properties
But my properties menu seems different.
It saids calculator property pages.
It doesnt have the tabs like ~Publish~ or ~Applications~ where people said you change your icon.
My properties is like this:
Configuration: Active(Debug)
and some other stuff below it some complicated stuff(to me)
Why doesnt mine have what other people have? I just want to share my first ever app with a custom icon. Help please, will appreciate it.
Create a text file, rename it res.rc, edit it to contain the line:
201 ICON "myicon.ico"
Add that file to your project. The file myicon.ico must exists.
Note: This is a bit hacky, the numerical vaulues should preferably be defined in a header.
You might be confused because Visual Studio supports different languages, and its UI is not consistent across those languages. Since you tagged it C++, the "old" rules apply. An application icon is a so-called resource.
You have to provide an .ico file, and reference it in a .rc file. The resource compiler (RC) compiles it into a .res file, and the linker then adds it to the EXE.
In C++, if you open the form in designer view, the properties window has an icon property that will allow you to browse for the icon of your choice.
Just for reference, i spent two hours trying to change it without any success until i resized the icon, it should be 32x32 and another one for small icon -not sure if its necessary though- with 16x16.
visual studio creates two icons when create the project , one is called small.ico and one is name yourexe.ico, just replace those and make sure to have correct sizes.
I would like to call MS PowerPoint Viewer executable(PPTVIEW.exe) from within my C++ application.
I do not wish to ask the user, where MS PowerPoint viewer is installed. I believe, it is not professional and relies on user making appropriate input. Instead, I would like to be able to identify the location of the installation directory on my own.
For example, the default location of MS PowerPoint Viewer 2007 is the following:
c:\program files\microsoft office\office12\PPTVIEW.exe
This of course does not have to be always true, especially different versions (2003, 2007, 2010) have have different locations.
Would you advise, please, where to get the correct path, and even better, to be able to identify, if MS PowerPoint viewer is not installed at all?
There must be something in the registry, but which key is the correct one?
I use:
Non Managed C++
Needs to be compatible with WinXP
Should be compatible with bot 32 and 64 bit OS
Should be able to identify location of Powerpoint Viewer of all the versions after 2003(including.)
Thank you.
The best solution so far i found is searching for the appropriate path in registry by reading the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\pptview.exe
The key above gives me location to where PowerPoint Viewer is installed. However, I have no clue whether this key is present in every workstation where PowerPoint Viewer is installed.
If you rephrase the question as "I would like to display a powerpoint in slideshow mode from within my C++ application." then it would be easy to achive this by querying the registered file handler and using the applicable COM object.
The following registry key will be present if there is a registered extension handler:
HKEY_CLASSES_ROOT\.pptx\
I want to add a file type extension to the Open Dialog of Excel (2003, 2007 if possible, 2007 only, if necessary).
When the user opens my type of file (i.e. myfile.myx), I want my application to read the file and paste the file into Excel in my own defined manner (by using Interop)
I think you are out of luck here. There is no documented way of extending Excel with custom import filter (as far as I know). Such a converter interface only exists for Word (http://support.microsoft.com/kb/111716).
If you want to modify the file open dialog you could try to subclass the dialog. This works for the Windows Common Dialogs (see http://www.codeproject.com/KB/dialog/customize_dialog.aspx for an example), but I suppose the Office dialogs use different messages and may not allow what you want to do.