I found that links can be disabled simply by EnableWindow(FALSE) for the CHtmlView control. Looks good, can't click the link.
Now, is there a way to disable scripts when using CHtmlView?
I didn't see anything that stood out in the docs.
TIA!!
Related
My application displays a grid of images. When the right mouse button is clicked a context menu is displayed where the first option is "Show in Explorer".
I was able to launch the default explorer on the directory by using:
QDesktopServices::openUrl(QUrl::fromLocalFile( directory ));
However I want also the file to be selected.
Is this possible? I suppose it should be, as many apps can do that.
openUrl is not suitable here. You need just start another process (with QProcess start or startDetached) with Windows explorer special arguments:
explorer.exe /select,"C:\pathTo\file.txt"
Ok, I want to thank #Chernobyl for his useful help.
However I've found a general solution posted here:
How to "Reveal in Finder" or "Show in Explorer" with Qt
It wasn't compiling at first because the QtCreator code is using a class called Environment which I tried to add to my project but that file then also includes others, etc. I checked and they are using it just to see if explorer.exe can be found on the system path. It was not so important (to me) so I removed that check and then I tested it. It's working perfectly. It's also supposed to work for Mac and Linux.
I am looking for vista style folder browse dialog with abily to choose folder path only.
Looks like that:
I have checked the VistaBridge and Microsoft Code Pack API, but there are only dialogs for file opening.
Do you know how to call this dialog or some solutions to customize standart FileBrowseDialogs?
Thanks.
You need to use SHBrowseForFolder API to have that Dialog, full example and documentation can be found here:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb762115(v=vs.85).aspx
I have some .cshtml templates I'm using to render to PDFs.
When I deploy to production they get precompiled and contain the text "This is a marker file generated by the precompilation tool, and should not be deleted!" Is there a way to tell ASP.NET not to precompile a particular subfolder? I thought maybe I could do this in web.config, but I can't find it.
I know this is 2 years old but recently I stumbled on the same problem, but since I needed the view for both MVC and e-mail I couldn't simply change the extension of the file.
Searching for solutions I found this documentation on aspnet_compiler and the -u options, that stands for Updatable, which keeps the original file intact after compilation.
In order to achieve the desired behavior I configured my publish profile as follow:
On Settings tab of Publish dialog expand the File Publish Options and check Precompile during publishing.
Click the Configure link after the checkbox and check Allow precompiled site to be updatable
Caution
Before jumping in this solution you should read carefully about the implications of this option. In the link I provided there is a Precompilation Decision Matrix to help on your decision.
I couldn't stop the views from being compiled, even by setting the build action to 'none' and turning on copy to output directory.
I ended up changing the extensions of my files to .prod, setting the content type as 'content', and setting them to open with the HTML editor in Visual Studio to get everything working the way I wanted.
I have the same problem as that described in this post
I am using Eclipse 3.5.2 with CDT and have not installed this Color Theme Plugin. When I am editing C/C++ source files and placing the cursor over a defined method, the generated tooltip window shows a "black" background color so that I could not clearly see the text inside the tooltip window. I have tried to change settings in "C/C++/Editor/Syntax Coloring" preference but I have not found setting of background color for tooltip window.
The above post suggested that I may have to re-install the whole eclipse but this solution seems would cause many troubles to me. Does anyone know an easier solution for this apparently small problem.
Thanks for any suggestion.
The default UI prefs in CDT seems to be missing the "sourceHoverBackgroundColor" setting.
To fix this add a line like the following:
sourceHoverBackgroundColor=255,255,255
to the file
[workspace]/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.ui.prefs
(be sure to back-up the file before you make changes to it!)
you'll need to get eclipse to re-read that file by restarting eclipse.
Change this color in the Eclipse preferences (Window/Prefernces menu). Good color is rgb=255,255,225 (this is default for Java), or choose your own.
Credits to assifm.
Full re-installation of eclipse may not be needed. However, it's worth cleaning up the workspace / project related settings. You can follow below steps:
Go to the workspace folder and remove .metadata
Go to the projects whichever you created under this workspace and
remove, .cproject and .project
Now, start the eclipse from the scratch, you will see that all your
color combination you set are gone ... it's ok
Install the color themes plugin; don't be afraid of it, it's really cool (it doesn't cause such issues for
me);
Download a proper color theme preference file .epf (here is
mine)
Store this .epf file inside your workspace directory; so that you
know that this color theme is for this workspace; though you can
store this anywhere
Go to File -> Import -> General -> Preferences and select this
.epf file and install.
You will get the desired black background and grey text and the
auto-complete options would be unaffected
You can also think of installing the full screen plugin for eclipse, for better visibility.
Hi people I been trying to do this the whole night, can somebody help me/guide me on this.
Details:
Not Visual Studio (using Geany).
I'm using A lightweight IDE, and projects option is not available.
Is for the .exe file output.
Please give me some guidance on this.
I use Resource Hacker for such tasks. This will add an existing icon to an EXE; you'll need another tool to make the actual icon.
I am guessing you are using Visual Studio since you are talking about Windows.
First go to "Resource View" (from menu: View → Other Window → Resource View). Then in "Resource View" navigate through resources, if any. If there is already a resource of Icon type, added by Visual Studio, then open and edit it. Otherwise right-click and select Add Resource, and then add a new icon.
Recompile your project and see if change takes effect.
Second way:
Use preprocessor directives in your resource script to choose your icon file.
You need to use the resource compiler rc.exe. You will also need to create a .rc file listing the resource (your icon). On compilation with rc.exe, you will get a .res file which should be passed to the linker.