Shutdown dialog with extra options.
- Description. [#]
- Introduction. [#]
- Features. [#]
- Programming. [#]
- Usage/Help. [#]
- Disclaimer. [#]
It is an alternative to windows XP shutdown dialog. It has more features than the traditional shutdown dialog, like process enumeration, auto-run, and registered services. It also makes use of regions to make custom shapes. It can be used in Windows 95, 98, NT4, 2000, ME for a XP style shutdown dialog.
The shutdown program is a small program that I coded a few years back while learning C++. I had coded it using Dev C++ using pure C++ and win32 apis. It is a small program which mimics the windows shutdown dialog. It uses GDI to make custom shapes and custom buttons.
The main features of shutdown are
- It can shutdown any PC running Windows operating system.
- It suitably uses the required permission to shutdown a pc running on windows NT, actually I have copied the code from a MSDN example.
- Option to power off and manual shutdown.
- Custom shape using GDI.
- Running process enumeration.
- Auto run list.
- Registered services list.
- Class Probe (non-functional)
- Window animations (for winver > win2000)
The programming for the shutdown is quite straight forward. It is programmed using pure C++. Some of the details if any one wants to know about,
It is done by applying regions to the dialog. The program mainly uses 3 regions. First the normal state, Second region for the expanded state, and the third region for catching the mouse click. I have carefully created the regions using various combinations of round rectangles by trial and error method. Once the region is applied the shape of the dialog outside the region becomes transparent. The portion of dialog out side the region also becomes transparent to the mouse events.
For the drop down button, I have tracked the hit–test for the third region.
For machines running on NT, shutdown API
ExitWindowsEx () requires privileges. The required privilege is accessed before the shutdown function call. After the call to the
ExitWindowsEx () API it returns immediately thus providing time for the program to exit. But before exiting the program resets the privilege.
EnumProcessModules() and other info please look into the code.
The Class Probe:
Please refer to my working class probe article at http://www.codeproject.com/threads/classprobe.asp
Usage / Help
Launch the program. Check the power off if you want to power off the machine. Note it doesn’t have any effect while logging off or restarting the Computer. Click the shutdown to shutdown Windows and if your computer supports automatic power off it will power-off the computer.
This code and the executable don’t claim to be perfect and error free. It also doesn’t come with any warranties and even any implied warranty of being fit for any proposes what so ever which includes "merchantability".
If there was any mistake in the writing, it is regretted.
I am currently looking for some persons to join in my open source project. If any one wants to contribute he/she is most welcome. My project is not personal and every one is invited... I am developing a multiplatform IDE for C/C++ with its own class lib, APIs and classes using pure C/C++.
Please visit: http://thunder.sourceforge.net for details
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.