Create a custom lock screen Windows 7 - c++

I think the title is pretty self explanatory. The material available on the net is largely on setting up custom images during the lock screen time.
The answer given here talks about invoking the windows provided lock screen by using the user32.dll.
I want to ask if there is any API that would let me use my own lock screen on Windows 7? The reason is that I have developed my own face recognition algorithm but I want to integrate it with the windows locking mechanism.
One application that actually does the same thing is Winlockpro that creates custom lock screens for Windows 8. It uses custom forms in VB for the images and links the rest to a DLL.
Can someone guide me to some useful resources (API's etc) for this?

You need to implement a Credential Provider. There are several examples on the web, and the link above to MSDN should get you started. (Believe it or not, it's much simpler than implementing a GINA provider was in XP.)

Related

Dim screen on Windows with C++

I've been looking into dimming a screen on a Windows platform from my program. I know that there's a SetMonitorBrightness API that allows this, but the issue for me is that it would be nice to be able to dim the screen on Windows XP as well (which that API does not support) and also dim screens on desktop computers.
So I did some research and found this utility that seems to dim my screen on a Windows XP desktop without a problem. I tried to contact the author to find out how they implemented the dimmer but I did not hear back from them.
So I was curious to hear from developers on this site, how do you think they managed to dim the screen when the SetMonitorBrightness API is not supported?
PS. I am a newbie developer myself trying to write an energy saving program for our small business. It is a nonprofit organization and we don't have funds to hire a Windows developer to do this for us. Most of our computers are Windows XP desktops, so as you can see I can't use SetMonitorBrightness API as it is widely documented on the web.
Thanks in advance.
In the case that you cite, have a look at the screensaver with Dependancy Walker. My guess is that they create a full screen window and use SetLayeredWindowAttributes() to set a semi-opaque setting for the window, thus making the screen appear dimmed. I doubt it would save you much money.
You might want to look into the DDC protocol which allows you to control aspects of some monitors. The MS API that allows you to do this can be found roundabout here: http://msdn.microsoft.com/en-us/library/windows/hardware/ff570290%28v=vs.85%29.aspx and you should look at the I2C functions too.
Alternatively you could look for a ready made library to do the DDC stuff for you, such as http://www.nicomsoft.com/products/i2c/. They too have a dimmer application that is free for personal use and non-free for commercial use. They may even allow you to use it for free if you contact them and explain it's for a non-profit organisation.
If you are trying to do this as an energy saving program why not use a screensaver setting that turns the monitor off after a certain period of idleness? In any case
Forgive me if this information is outdated, but I have done this in the past using SetDeviceGammaRamp. The 'Get' version is available too for state saving and restore. I have seen it used in C# programs through, so it might still be relevant albeit not too common anymore.

How do I host a windowless Flash Player?

I would like to use windowless activation for a Flash Player control. Unfortunately, there is a very low amount of documentation available about this, even on MSDN. Most articles I found describe related issues, or how to make your own AX control support windowless activation. I have found some articles describe the hosting process (which I want), but with ATL. However, I already have an application, utilizing Qt and using the mingw-gcc compiler, in which it is probably not easy to incorporate.
I would like to learn the most possibly basic way of painting a windowless ActiveX control somewhere (on a DC?), and sending keyboard/mouse events to it. Links or detailed advice is appreciated.

Bonjour/DNS-SD on Windows

I'm currently working on a cross-platform application (Win/OSX/iOS) which has a C++ (with Boost) back end. On iOS and OSX I'm using the Cocoa Net Service Browser Delegate functions to discover an embedded device via mDNS, then pass the information to the back end to create the objects it needs to communicate with it.
I wanted to take a similar approach with my Windows MFC front end and I found this article which seemed to do exactly what I want. However, it seems that using the Bonjour SDK has some really nasty side effects - forcing you to static link to MFC and in my case the only way I can get it to link properly is to not use debug DLLs at all, which is not ideal.
So, the Bonjour SDK isn't really any good for me because it imposes too many restrictions on my project. With Cocoa I'm actually using very little of the functionality - just didFindService and netServiceDidResolveAddress really. All I want to do is find the devices of a given type and get their IP addresses.
Can anyone suggest another way around this that will work with an MFC front end on Windows?
From what I have been able to gather from researching this topic just goto http://www.opensource.apple.com/source/mDNSResponder/mDNSResponder-333.10/ and grab the source. There is a VC project file which will let you build the dll how you want.

Skinning WinAPI Controls

If you've ever seen an application in the Adobe Creative Suite 5 (CS5), you may have noticed that it doesn't look like the native Windows GUI.. They have modified it to have a different look to it.
Where would someone begin to make an application that has a custom skin? CS5 uses the Adobe Source library for it's widget/control management, so I tried downloading and compiling the Adobe Source Library to see if I could make a nice skinned app like Photoshop CS5, but after finally getting it to compile and tested it, I realized the library was only for managing widgets and not skinning the GUI, like CS5 has.
Where would I begin to make a nice skinned program like Adobe Cs5 applications? Can anyone point me in the right direction?
Do I simply use the WM_PAINT Message from WinAPI and render my own widgets using openGL or something?
Use QT and QML. It doesn't have a steep learning curve. You define your GUI with JavaScript and add lots of effects and enjoy using PNGs in every single thing you can imagine. Then you do your application logic with C++. In fact you can do some fairly advanced things other than UI with QML but it's better to seperate concerns as always.
I use it at work for a product to be released. Overriding WM_PAINT is not the only way in Windows but I strongly recommend QT instead of Win32 API when it comes to custom drawn UI. At least to my experience, it is way easier than my adventures with Win32 API.
If you want to implement custom controls by yourself, you need to implement own WM_PAINT and draw with using GDI/GDI+. For toplevel windows and popups you can use Layered windows. But I think you can find a lot of professional custom controls over internet for reasonable price if you don't want to implement by yourself.
I think your choices re creating a modern skinned app are: QT or WPF (via C++/CLI).
If you have an existing Win32 API application and you do not want to rewrite it using a library that supports skinning you might want to have a look at Stardock DirectSkin.
If you decide to rewrite your application I would also recommend Qt. Guitar Pro 6 was rewritten using Qt, read more about their experience here.

Windows 7 GUI reference

I maintain a large C++ application using Win32 and i want to use some of the new controls introduced in Vista/Windows 7 (New ballon help, command links, status bar notofications.
I have downloaded the Windows User Experience Interaction Guidelines, but i dont find a corresponding API Reference. I know that some of these controls will be not available from core Win32 - so i am looking as well for some source about which controls need which API (WPF or whatever).
Any Links?
The Windows 7 SDK site has a number of downloads and guidance pages which should help point you in the right direction: http://msdn.microsoft.com/en-us/windows/bb980924.aspx
The taskbar/notification API is further documented here: http://msdn.microsoft.com/en-us/library/dd378460(VS.85).aspx
Following Wolfs link and browsing for quite a while, i came up with the following entry point (on microsoft.com), that looks quite valuable to me:
Windows User Interface
and more specifically:
Windows Controls
As far as i can see there is nothing that can NOT be done using core Win32.