displaying an icon in the notification bar for a windows service? - c++

i am using the code from this website to create a basic service
http://code.msdn.microsoft.com/windowsdesktop/CppWindowsService-cacf4948
and i want this service to appear as an icon in the toolbar.
would i be able to start and stop the service from the icon?
right now i have to go into the SCM to start and stop the service and it takes too long to scroll down the list and find the service then start or stop it.
some websites are saying this can't be done because you can't interact with a service
is this true?
i don't care if this is a bad idea or shouldn't be done. i just want to know the code if can it be done so can someone please help?

I got a "Please avoid extended discussions in comments" message, so I'm proposing this answer.
Write a icon tray application; this link gives an example of how to do this (also see the "Related Articles" on the right of the article).
When you (right-) click on the tray icon, the icon tray application should determine if the service is already running; if yes, pop up a menu item to stop the service, otherwise pop up a menu item to start the service.
Answers to this StackOverflow question has pointers to how you can manage services using the Windows API.

Related

AWS Connect: Custom CCP bring to front

I'm aware that the Amazon Connect CCP is based on the idea that it can be developed and integrated in any website at will without the restrictions of a closed product. However the fact that it is embedded, means it has some agent usability drawbacks. While browsing to multiple tabs you can eventually loose the tab where CCP resides. This means that if the agents needs to mute, hold, ... it might take a while before they find the right tab.
Is it possible to create a CCP that it can be always visible?
Thanks,
I set up an external screen pop as detailed in the AWS blog, and I have the issue on Windows 10 and Chrome. When call coming the pop-up notification apears, when clicking on the pop-up notification, you are not redirected to the CCP browser window.
However, I also tried the same setup on Firefox and the issue disappears: when clicking on the pop-up notification, the CCP browser tab gains focus correctly. Additionally, I set up another screen pop with a different instance and S3 bucket, using the files provided in the blog, and it yielded the same result: the issue appears with Chrome, but not with Firefox. It all points in the direction of it being an issue related to the integration between Chrome and the Windows pop-up notifications (the same problem for MacOS).

Launching an UI or an application when a system tray notification is clicked

I have created a system tray icon notification. I need to launch an application when the notification is clicked. How can I do that using C++? I have read about the IUserNotification2 interface from MSDN documents, but I'm not sure how to implement them. It would be so helpful if someone can share an example code for a click event.

Google Glass GDK Voice Input doesn't work anymore since update to XE22

Since the last update of Google Glass I have a problem with voice commands. My app worked very well before the software update, but since it updated to XE22 the "ok glass" doesn't work anymore.
When I start the Glass and come to "ok Glass" screen, I can say "ok Glass" and the List of commads (Take a picture, Google, Make a call to, etc.) open. But then the voice input seems to freeze, when my applications are in this list too. The Glass doesn't react on "ok Glass" anymore. But this don't happen with all of my apps. Some of my apps are excepted, although I use the same way to define the keyword (e.g. like this: <trigger keyword="Open my Application" />).
The same problem occurs in the contextual menu. When I use only 3 contextual menu items, it works very well. But when I use more then 3 menu items the voice input freezes, too. Glass doesn't react on voice commands anymore and I need to restart Google Glass.
Before the update everything worked without any problems. I could start my apps in "ok Glass", as well as use contextual voice commands, which I have created exactly like here (https://developers.google.com/glass/develop/gdk/voice#using_unlisted_main_voice_commands).
Have anyone the same problem with the new software update, or does anyone know what to do? Did anything change in defining voice commands? I searched very long, but I didn't find anything.

Using a web site button control via C/++

I use www.jango.com as PC music player and want to steer it remotly via my smartphone. I have a server program for controling the PC and an app as client.
I want to use the server program for example to press the play/pause or fast forward button in jango.com running inside the chrome webbrowser.
A simple way would be to simulate a windows mouse click at a specified position within the chrome window. But it would have the disadvantage that it would only work if the jango tab is active and will of course fail if the site changes it's layout and probably due to a lot other reasons.
So I'm thinking about generating kind of the same http request as the browser does if one clicks the button for real. Or somehow accessing the html elemnt
Please consider thatm while having a C/++ background, I lack any web/JS programming skills and would be in favor keeping it this way as much as possible.
Thank you for any suggestions!
The solution is to use an user script for the musik player web site which is able to trigger the buttons in question. Than websockets can be used to communicate between the user script and the c++ server program.

MFC : How to capture a link click event in a web browser control?

I have an MFC application that has a webcontrol. When clickable links are clicked, it opens using IE, not the default browser.
Questions :
Is there a way to force it to open using the default browser?
If not, how do I capture the Link Click event so I could just manipulate the click event later?
Thanks...
No, not as far as I know.
Check out the articles on http://ehsanakhgari.org/article/visual-c/webbrowser-goodies . It has a number of articles that show how to set up an event sink using IDocHostUIHandler etc. to handle events like clicking of links. I'm not sure which interface to implement, it's been years since I last did this. Then, you use ShellExecute() with a url as the third parameter to open a url with the default browser.
You can capture click events by using "HRESULT STDMETHODCALLTYPE Invoke" see MSDN for more details.
And here's a great example that shows how to open your URL using the default browser in the same window, or opening a new window > http://www.codeproject.com/KB/IP/urlnewwindow.aspx