How can I make a url embedded in the about dialog box appear as a hyperlink? (resource script .rc) - c

I have an application written in c that has no dialog box.
However, when you right click the icon you get a floating menu and from there you can choose the about option. This will open an about dialog box. I have inside a link to some webpage, that can be pressed- that will open a browser and navigate to the URL. However, I am unable to make that URL appear as a hyperlink (all that GUI related work is done via the resource .rc file only).
Does anyone know how to color that link in blue and underline to make it appear as a hyperlink through resource script only?
Thank you

I haven't tried this myself but it looks like you can use the CONTROL statement in the resource script to include the SysLink class (which requires common controls v6/Win XP, and will therefore mean you also need a manifest in your application). For more details see http://msdn.microsoft.com/en-us/library/bb760706%28VS.85%29.aspx.
However, you will need to handle the notification from the SysLink control in order to launch the browser and you would need to call InitCommonControlsEx() before the dialog resource is used. That might stop all your GUI work being done by the rc file.
Another alternative would be to register a new window class, subclass from the SysLink control and customise the window message that would normally send the click notification to the parent in order to launch the browser. You could then use your custom class name in a CONTROL statement in the rc file. You still have more work to do but all the GUI handling would be done for you.

Related

Python WebBrowser Open In Same Tab

running this line:
webbrowser.open(page.path, new=0, autoraise=True)
I always get the page opened in a new Tab.
How can I get it in the same Tab as it should be using new=0?
This can't be done unfortunately.
You can set the variable to whatever you want but browser tab behaviour is hard-set in modern browsers and will override it. You'll find that you won't be able to use new=1 to open in a brand new window either, for the same reason. It will always just be a new tab.
The last update to the webbrowser module in the Github was about the same age as this question, I wonder if this has been abandoned.

Prevent user from manipulating folders from 'save file' dialog

I have an application in Labwindows that when a user clicks on a button, 'Save data', the button launches a file selection dialog box. For security reasons I want to disable the user from right clicking any where on the 'file selection dialog box' and being able to delete/rename existing files and/or create/delete existing folders/directories.
This can be done in windows with keyboard hook but thought there might be something easier in Labwindows. I have already tried setting the allowMakeDirectory attribute to 0 but this did nothing and the 'FileSelectPopupEx' function does not have an 'allowMakeDirectory' attribute to set.
I'm developing on windows7 and running the app on Vista.
Also for those who don't know most things that can be done in Windows, i.e. calls to strcpy, GetLastError() and etc., can be called from LabWindows.
Any suggestions would be appreciated.
Thanks

Is it possible to pass control back to browser after plugin is loaded

I have created NPAPI browser plugin. My plugin can handle certain mime-types, but i wish to give the user an option whether he wants to load the content using plugin or browser should take the default action. A Gtk dialog box with these options. But is it possible to give control back to browser after plugin is loaded.
There's no way to undo the handoff of content to a plugin, no.
Is this embedded content, or content loaded directly in its own tab? If it's the former, you could use JS to decide whether or not to create the plugin object in the first place. If it's the latter, and you control how the user gets to the content, you could give them a choice and then serve the content two different ways, one with the default type (which you wouldn't register your plugin for), and one with a special type your plugin handles.

Getting IE Browser to open the File

I embed the default Internet Explorer in my win32-C Application via COM/OLE.
I display a web page having a link (anchor tag) to save/open a file.
When i click on the link, It does some processing in the background but does not give me a dialog box asking to save or open the file. From Fiddler I come to know that it is writing to the cache but not able to access it or show any popup.
I expect to see the dialog box asking me to either save or open the file (default)
If i do this from the IE browser then everything works fine.
EDIT : I tried a sample code in which I do get to see the Dialog Box providing me with the option of saving, opening the file although tallied everything with my code I still fail to see the box.
I was thinking of the Modeless Dialog Box issue but I can see a Message Box in my code. So modeless dialog box is not disabled.
Not able to get how to get it to work.
(Note: Please see the attached images)
EDIT: I edited the The EmbedBrowser Function in my code, my browser was not given a pointer to my IOleClientSite object
New Code :- http://paste.ubuntu.com/1062010/
But problem persists!
I figured out the issue.
The interface DWebBrowserEvents2's invoke method was implemented to not display the File download Box while downloading.
Modified it to allow the same.

How do I access the existing running windows forms application through url?

I have a windows forms application and which provides a way to search the database based on the provided value. Sometime I need to open the application through a simple html hyperlink with the search result while loading itself. There are two questions/doubts from here.
How to access the existing running windows forms application as url? If this is possible, how can I pass the argument?
If the application is not running, we have to start the application and search the value. This also has to be happened when I click the link.
Simply we can say like, if you open a website link from your outlook email, the link will be opening in existing opened default browser or it will start the new browser(if the browser is not already opened.) I want to achieve the same behavior.
Seems to be the below post is somewhat related to my queries, but this does not solve my problem.
Activate existing browser window with given URL from C# application (without triggering reload)
You can't do this. The default browser launches when you click on a link because it is set up in the registry as the default handler for hyperlinks.

Resources