diff --git a/7/Bin/SimplyTransparent.exe b/7/Bin/SimplyTransparent.exe deleted file mode 100644 index cbe249b..0000000 Binary files a/7/Bin/SimplyTransparent.exe and /dev/null differ diff --git a/7/Bin/res_x86.dll b/7/Bin/res_x86.dll deleted file mode 100644 index 74156c7..0000000 Binary files a/7/Bin/res_x86.dll and /dev/null differ diff --git a/7/Bin/tool_x86.dll b/7/Bin/tool_x86.dll deleted file mode 100644 index 9dd53fe..0000000 Binary files a/7/Bin/tool_x86.dll and /dev/null differ diff --git a/7/Help/ST7 Help src files.zip b/7/Help/ST7 Help src files.zip deleted file mode 100644 index ecc0bda..0000000 Binary files a/7/Help/ST7 Help src files.zip and /dev/null differ diff --git a/7/CfgFuncs.cpp b/App/CfgFuncs.cpp old mode 100644 new mode 100755 similarity index 100% rename from 7/CfgFuncs.cpp rename to App/CfgFuncs.cpp diff --git a/7/CfgFuncs.h b/App/CfgFuncs.h old mode 100644 new mode 100755 similarity index 100% rename from 7/CfgFuncs.h rename to App/CfgFuncs.h diff --git a/7/Help/Advanced Icon Hiding Options.htm b/App/Help/Advanced Icon Hiding Options.htm old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/Advanced Icon Hiding Options.htm rename to App/Help/Advanced Icon Hiding Options.htm diff --git a/7/Help/Checking for Updates.htm b/App/Help/Checking for Updates.htm old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/Checking for Updates.htm rename to App/Help/Checking for Updates.htm diff --git a/7/Help/Contact Information.htm b/App/Help/Contact Information.htm old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/Contact Information.htm rename to App/Help/Contact Information.htm diff --git a/7/Help/FAQ.htm b/App/Help/FAQ.htm old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/FAQ.htm rename to App/Help/FAQ.htm diff --git a/7/Help/Index.hhk b/App/Help/Index.hhk old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/Index.hhk rename to App/Help/Index.hhk diff --git a/7/Help/Introduction.htm b/App/Help/Introduction.htm old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/Introduction.htm rename to App/Help/Introduction.htm diff --git a/7/Help/Known Issues.htm b/App/Help/Known Issues.htm old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/Known Issues.htm rename to App/Help/Known Issues.htm diff --git a/7/Help/Lock Method.htm b/App/Help/Lock Method.htm old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/Lock Method.htm rename to App/Help/Lock Method.htm diff --git a/7/Help/Options.htm b/App/Help/Options.htm old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/Options.htm rename to App/Help/Options.htm diff --git a/7/Help/Readme.htm b/App/Help/Readme.htm old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/Readme.htm rename to App/Help/Readme.htm diff --git a/7/Help/Requirements.htm b/App/Help/Requirements.htm old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/Requirements.htm rename to App/Help/Requirements.htm diff --git a/7/Help/Set Text Color Window.htm b/App/Help/Set Text Color Window.htm old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/Set Text Color Window.htm rename to App/Help/Set Text Color Window.htm diff --git a/7/Help/SimplyTransparent.hhp b/App/Help/SimplyTransparent.hhp old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/SimplyTransparent.hhp rename to App/Help/SimplyTransparent.hhp diff --git a/7/Help/Table of Contents.hhc b/App/Help/Table of Contents.hhc old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/Table of Contents.hhc rename to App/Help/Table of Contents.hhc diff --git a/7/Help/The Menu.htm b/App/Help/The Menu.htm old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/The Menu.htm rename to App/Help/The Menu.htm diff --git a/7/Help/Troubleshooting.htm b/App/Help/Troubleshooting.htm old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/Troubleshooting.htm rename to App/Help/Troubleshooting.htm diff --git a/7/Help/Version History.htm b/App/Help/Version History.htm old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/Version History.htm rename to App/Help/Version History.htm diff --git a/7/Help/Welcome.htm b/App/Help/Welcome.htm old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/Welcome.htm rename to App/Help/Welcome.htm diff --git a/7/Help/backdrop.jpg b/App/Help/backdrop.jpg old mode 100644 new mode 100755 similarity index 100% rename from 7/Help/backdrop.jpg rename to App/Help/backdrop.jpg diff --git a/7/Options.cpp b/App/Options.cpp old mode 100644 new mode 100755 similarity index 100% rename from 7/Options.cpp rename to App/Options.cpp diff --git a/7/Options.h b/App/Options.h old mode 100644 new mode 100755 similarity index 100% rename from 7/Options.h rename to App/Options.h diff --git a/App/Simply Transparent/CfgFuncs.cpp b/App/Simply Transparent/CfgFuncs.cpp new file mode 100755 index 0000000..4cbb3b7 --- /dev/null +++ b/App/Simply Transparent/CfgFuncs.cpp @@ -0,0 +1,150 @@ +/////////////////////////////////////////////////////////////////////////////// +//// Configuration Functions +// +#include "stdafx.h" +#include "SimplyTransparent.h" +#include "CfgFuncs.h" + + + +COLORREF rgb_from_text( string txt_rgb ) +{ + + int R,G,B; + char color[15]; + char * buf; + + txt_rgb.copy( color, 15 ); + + buf = strtok( color, "," ); + R = atoi( buf ); + + buf = strtok( 0, "," ); + G = atoi( buf ); + + buf = strtok( 0, "," ); + B = atoi( buf ); + + return RGB(R,G,B); +} + + + + + + + + + + + + +string rgb_to_text( COLORREF c )//char[15] +{ + char color_rgb[15]; + sprintf( color_rgb, "%d,%d,%d", GetRValue(c), GetGValue(c), GetBValue(c) ); + + string color = color_rgb; + + return color; +} + + + + + + + + + + +DWORD ReadIntSetting( string section, string lable, DWORD def ) +{ + DWORD x = 0; + + try{ + + DWORD *n = NULL; + bool bAlloced = false; + + n = (DWORD *)ReadSetting( (char *)section.c_str(), (char *)lable.c_str(), &def, &x, bAlloced ); + + x = *n; + + + } + catch(...){ + __ErrorMessage( "ReadIntSetting( )" ); + } + + return x; +} + + + + + + + + + +void WriteIntSetting( string section, string lable, int data ) +{ + WriteSetting( (char *)section.c_str(), (char *)lable.c_str(), &data ); +} + + + + + + + + + + + +DWORD ReadRGBSetting( string section, string lable, string def ) +{ + COLORREF x; + + try{ + + char *n = NULL; + bool bAlloced = false; + + n = ReadSetting( (char *)section.c_str(), (char *)lable.c_str(), (char *)def.c_str(), n, bAlloced ); + + + x = rgb_from_text( n ); + + + if(bAlloced) + delete n; + + } + catch(...){ + __ErrorMessage( "ReadRGBSetting( )" ); + } + + return x; +} + + + + + + + + +void WriteRGBSetting( string section, string lable, COLORREF data ) +{ + try{ + string rgb = rgb_to_text( data ); + + WriteSetting( (char *)section.c_str(), (char *)lable.c_str(), rgb.c_str( ) ); + + } + catch(...){ + __ErrorMessage( "ReadRGBSetting( )" ); + } +} \ No newline at end of file diff --git a/App/Simply Transparent/CfgFuncs.h b/App/Simply Transparent/CfgFuncs.h new file mode 100755 index 0000000..352874b --- /dev/null +++ b/App/Simply Transparent/CfgFuncs.h @@ -0,0 +1,158 @@ +/////////////////////////////////////////////////////////////////////////////// +//// Configuration Functions header file (CfgFuncs.h) +// + +#ifndef ____CFG_FUNCS_H___ +#define ____CFG_FUNCS_H___ + +#include "resource.h" +#include + +COLORREF rgb_from_text( string txt_rgb ); +string rgb_to_text( COLORREF c ); + +DWORD ReadIntSetting( string section, string lable, DWORD def ); +void WriteIntSetting( string section, string lable, int data ); + +DWORD ReadRGBSetting( string section, string lable, string def ); +void WriteRGBSetting( string section, string lable, COLORREF data ); + +template +inline int WriteSetting( char section[], char lable[], T *data ) +{ + int ret = 1; + + try{ + + const unsigned int string_size = 50; + + DWORD disposition; + LONG res = 0; + HKEY softkey = NULL, key = NULL; + char subkey[MAX_PATH]; + char appname[string_size]; + char author[string_size]; + + LoadString( GetMyInstanceHandle( ), IDS_APP_TITLE, + appname, string_size ); + + LoadString( GetMyInstanceHandle( ), IDS_REGISTRY_KEY, + author, string_size ); + + sprintf( subkey, "%s\\%s\\%s", author, appname, section ); + + res = RegOpenKeyEx( HKEY_CURRENT_USER, "software", 0, KEY_WRITE, + &softkey ); + if( ERROR_SUCCESS == res ) + { + res = RegCreateKeyEx( softkey, subkey, 0, "key", + REG_OPTION_NON_VOLATILE, KEY_WRITE, 0, &key, &disposition ); + if( ERROR_SUCCESS == res ) + { + res = RegSetValueEx(key, lable, 0, + ( sizeof( *data ) == sizeof( char ) ) ? REG_SZ : REG_DWORD, + (BYTE*)data, ( sizeof( *data ) == sizeof( char ) ) ? strlen( (const char *) data ) : sizeof( data ) ); + if( ERROR_SUCCESS == res ) + { + ret = 0; + } + } + } + + RegCloseKey( softkey ); + RegCloseKey( key ); + + }catch(...){ + + __ErrorMessage( "WriteSetting( )" ); + + } + + return ret; +} + + + + + + + + + + + + + +template +inline T * ReadSetting( char section[], char lable[], T *def, T *data, bool &alloced ) +{ + LONG res = 0; + + try { + + const unsigned int string_size = 50; + + DWORD disposition, size, type = ( sizeof( *def ) == sizeof( char ) ) ? REG_SZ : REG_DWORD; + + HKEY softkey = NULL, key = NULL; + char subkey[MAX_PATH]; + char appname[string_size]; + char author[string_size]; + + LoadString( GetMyInstanceHandle( ), IDS_APP_TITLE, + appname, string_size ); + + LoadString( GetMyInstanceHandle( ), IDS_REGISTRY_KEY, + author, string_size ); + + sprintf( subkey, "%s\\%s\\%s", author, appname, section ); + + res = RegOpenKeyEx( HKEY_CURRENT_USER, "software", 0, KEY_WRITE, + &softkey ); + if( ERROR_SUCCESS == res ) + { + res = RegCreateKeyEx( softkey, subkey, 0, "key", + REG_OPTION_NON_VOLATILE, KEY_QUERY_VALUE, 0, &key, &disposition ); + if( ERROR_SUCCESS == res ) + { + res = RegQueryValueEx(key, lable, 0, &type, 0, &size ); + if( ERROR_SUCCESS == res ) + { + if( type == REG_SZ ) + { + alloced = true; + data = new T[size/sizeof(T)]; + } + + res = RegQueryValueEx(key, lable, 0, &type, (BYTE*)data, + &size ); + + res = ( ERROR_SUCCESS == res ) ? 1 : 0; + + if(res != 1) + { + if(type == REG_SZ) + delete data; + + data = def; + } + } + else data = def; + } + else data = def; + } + else data = def; + + RegCloseKey( softkey ); + RegCloseKey( key ); + + }catch(...){ + + __ErrorMessage( "T * ReadSetting( )" ); + + } + + return (res == 1) ? data : def; +} + +#endif //____CFG_FUNCS_H___ \ No newline at end of file diff --git a/App/Simply Transparent/Help/Advanced Icon Hiding Options.htm b/App/Simply Transparent/Help/Advanced Icon Hiding Options.htm new file mode 100755 index 0000000..ed3e65a --- /dev/null +++ b/App/Simply Transparent/Help/Advanced Icon Hiding Options.htm @@ -0,0 +1,90 @@ + + + + +Advanced Icon Hiding Options + + + + + +
+ +

Advanced Icon Hiding Options

+ +

+ + +

+ +

Enable button
+If this option is enabled and the Automatic Icon hiding method is selected, +Simply Transparent will show a button in the top-left corner instead of your +icons. To make your icons show, click the button.

+ +

Hide/Show Responsiveness
+Here you have the ability to make icon hiding more or less responsive. One +quick note though: The more responsive you make this, the more Simply +Transparent uses your CPU.

+ +
+ + + + diff --git a/App/Simply Transparent/Help/Checking for Updates.htm b/App/Simply Transparent/Help/Checking for Updates.htm new file mode 100755 index 0000000..822a96c --- /dev/null +++ b/App/Simply Transparent/Help/Checking for Updates.htm @@ -0,0 +1,83 @@ + + + + +Checking for Updates + + + + + +
+ +

Checking for Updates

+ +

 

+ +

You can check for updates by +right clicking the icon in the system tray and selecting “Check for Updates”

+ +

+ +

+ +


+Or you can use the “Check for Updates” option in the Simply Transparent program +menu on your Start menu.

+
+ + diff --git a/App/Simply Transparent/Help/Contact Information.htm b/App/Simply Transparent/Help/Contact Information.htm new file mode 100755 index 0000000..377e86a --- /dev/null +++ b/App/Simply Transparent/Help/Contact Information.htm @@ -0,0 +1,92 @@ + + + + +Contact Information + + + + + +
+ +

Contact Information

+ +

 

+ +

To reach me visit my web +site at: http://www.jonathangrimes.com +and click on Contact.

+ +

 

+ +

Or, you may email me directly at: st7@jonathangrimes.com

+ +
+ + + + diff --git a/App/Simply Transparent/Help/FAQ.htm b/App/Simply Transparent/Help/FAQ.htm new file mode 100755 index 0000000..ab82b18 --- /dev/null +++ b/App/Simply Transparent/Help/FAQ.htm @@ -0,0 +1,255 @@ + + + + +FAQ + + + + + +
+ +

FAQ
+
+
+Q:
+Why do I need the Desktop Update from Internet Explorer 4?

+ +

Why do I get errors with Simply Transparent on my computer +with Windows95/NT4?

+ +

A:

+ +

Simply Transparent was written and tested on +Windows98/ME/2000 systems. I used some system calls that did not exist until +Internet Explorer 4 was released. Internet Explorer came with a Windows98 +preview named the "Desktop Update". This desktop update does not come +with any other versions of Internet Explorer.

+ +

 

+ +

You probably did not install Internet Explorer 4’s Desktop +update, or you skipped Internet Explorer all together.

+ +

 

+ +

The solution to this problem is actually simple.

+ +


+Step 1:
+Find a copy of Internet Explorer 4.
+
+

+ +

Step 2:
+Remove your current version of Internet Explorer.

+ +


+Step 3:
+Install Internet Explorer 4.
+
+

+ +

Step 4:

+ +

Finally reinstall your current +version of Internet Explorer.

+ +


+Q:

+ +

Why does my icons not redraw after I change my selection?

+ +

 

+ +

A:
+You have the Active Desktop feature: "Show Web Content" (also called +"View As Web Page") enabled. Disable it.

+ +

 

+ +

If you have a wallpaper image that won’t show with out the +"Show Web Content" feature enabled, see the section of this FAQ called +"How do I convert my wallpaper to a Windows Bitmap (BMP)?"

+ +

 

+ +

Q:

+ +

How do I apply an image off the Internet as my wallpaper?

+ +

 

+ +

A:

+ +

There are many ways to do this, but I think this is the easiest way:

+ +

 

+ +

The one and only Step:
+With +your image opened in your web browser, right click it and select "Set as +Background"

+ +

 

+ +


+Q:
+How do I convert my wallpaper to a Windows Bitmap (BMP)?

+ +

 

+ +

First of all, there are many +ways to do this. The method I am going to outline is the most universal.

+ +

 

+ +

Step 1:

+ +

Open Internet Explorer

+ +

 

+ +

Step 2:
+Looking at the menu bar at the top of the window, select File and then Open.

+ +

 

+ +

Step 3:

+ +

In the resulting Open dialog box click the browse +button

+ +

+

+ +

 

+ +

Step 4:

+ +

Now, in this new File Open dialog box, change the +file type to the file type of your image. (Jpeg, Gif, Png, etc...)

+ +

 

+ +

+ +

+ +

+ +
+Note: if your Open box does not look like this you are okay.File type lists are present in all versions.

+ +

 

+ +

Step 5:

+ +

Now, find your image file, and select it.  Then click the Open button, and click the OK +button in the Open window.

+ +

+

+ +

 

+ +

Step 6:

+ +

You should now be looking at your image inside +Internet Explorer.  (if a different +program opened with your image that’s okay try to follow the best you can)   Looking at the menu bar at the top of the window, +select File and then “Save As...”.

+ +

 

+ +

+ +

+ +

 

+ +

Step 7:

+ +

Change the “Save as type” to Bitmap (*.BMP)

+ +

+

+ +

Step 8:

+ +

Choose a file name and then click the Save button.

+ +

 

+ +

 

+ +

You are done, but if you want the image to show in your Display +properties put the new image in the Windows directory or your “My Pictures” +folder.

+ +
+ + + + diff --git a/App/Simply Transparent/Help/Index.hhk b/App/Simply Transparent/Help/Index.hhk new file mode 100755 index 0000000..2e24f6f --- /dev/null +++ b/App/Simply Transparent/Help/Index.hhk @@ -0,0 +1,9 @@ + + + + + + +
    +
+ diff --git a/App/Simply Transparent/Help/Introduction.htm b/App/Simply Transparent/Help/Introduction.htm new file mode 100755 index 0000000..c32e4bf --- /dev/null +++ b/App/Simply Transparent/Help/Introduction.htm @@ -0,0 +1,99 @@ + + + + +Introduction + + + + + +
+ +

Introduction

+ +

 

+ +

The Windows desktop has a problem: it does not provide +transparent icon labels, or a means to set the icon label’s text color.

+ +

Introducing Simply Transparent!

+ +

This program gives you the options Windows forgot.

+ +

 

+ +

Picture this: You have one awesome background picture on +your desktop but you can't see half of it! Why you ask? Your icon labels cover +it up!

+ +

Setting the background color doesn't help, so what are you +going to do?

+ +

 

+ +

That is were this program will help. It will remove all the +ugly opaque text boxes that appear under the icons on your desktop.
+
+

+
+ + + + diff --git a/App/Simply Transparent/Help/Known Issues.htm b/App/Simply Transparent/Help/Known Issues.htm new file mode 100755 index 0000000..6bf8cbd --- /dev/null +++ b/App/Simply Transparent/Help/Known Issues.htm @@ -0,0 +1,82 @@ + + + + +Known Issues + + + + + +
+ +

Known Issues

+ +

 

+ +

If you switch lock methods +from Brute Force to Advanced...icons may not be set transparent.  Just refresh your desktop to nudge it, or +exit Simply Transparent and rerun it.

+ +

 

+ +
+ + + + diff --git a/App/Simply Transparent/Help/Lock Method.htm b/App/Simply Transparent/Help/Lock Method.htm new file mode 100755 index 0000000..441e9c4 --- /dev/null +++ b/App/Simply Transparent/Help/Lock Method.htm @@ -0,0 +1,94 @@ + + + + +Lock Method + + + + + +
+ +

Lock Method

+ +

 

+ +

+ +

+ +

Method 1 - Brute Force:
+This method is what I call "Brut-forcing" the issue. A timer is set +to check the desktop window ever so often to see if it needs to reapply the +transparency.
+Depending on how you set the Timeout interval, this option can be CPU +intensive.

+ +

Method 2 - Advanced: (Default)
+This method is smarter than the first method. With this option enabled Simply +Transparent takes control of the desktop and prevents the icon labels from +changing.
+This option is not CPU intensive at all.

+ +
+ + + + diff --git a/App/Simply Transparent/Help/Options.htm b/App/Simply Transparent/Help/Options.htm new file mode 100755 index 0000000..f63945a --- /dev/null +++ b/App/Simply Transparent/Help/Options.htm @@ -0,0 +1,165 @@ + + + + +Options + + + + + +
+ +

Options

+ +

 

+ +

+ +

+ +

Text Color
+
This button will cause the +Text Color selection window to popup.
+
+Enable icon hiding

+This option enables Simply Transparent to hide the icons on your desktop.

+ +

-Automatically +- When this method is chosen, your desktop icons will only appear +when your mouse pointer is over your desktop space.
+
+-Manual - When this method is chosen, you must double-click +the Simply Transparent tray icon to toggle the desktop icon's visibility.

+ +

-Advanced Button - This button will bring +up a window with more options to further customize the icon-hiding behavior.

+ +

Enable hot tracking
+This option enables your desktop icons to highlight as your mouse hovers over +them.

+ +

-Hover +Selection - Your desktop icons will highlight as your mouse pointer +hovers over them.
+-Hover Selection + underline labels on hover - Your desktop +icons will highlight and become underlined as your mouse pointer hovers over +them.
+-Hover Selection + always underline labels - All your desktop +icons will be underlined, and they will highlight as your mouse pointer hovers +over them.

+ +

-Amount of time that the mouse cursor must hover +over an item before it is selected: This number is in milliseconds +(1/1000th of a second). If you want to increase the hover select time type a +larger number. Also, if you want to speed up the hover select time, type a +smaller number. If you type 0 (zero) in this box, windows will use the default +hover select time.

+ +

Enable Strict Active Desktop Checking
+As you have probably noticed, Simply Transparent will refuse +to run if it detects that the Active Desktop’s "Show Web Content" +(or "View As Web Page") feature is enabled.

+ +

This option makes Simply Transparent check for the “Show Web +Content,” if it finds it then Simply Transparent will exit, or refuse to run.

+ +

 

+ +

For those who want the "Show Web Content" feature, disable this function. +Be warned though, you better be willing to live with the anomalies caused by it.
+
+NOTE: If you know you will not be using Active Desktop's "Show Web +Content" feature you can also disable this option to free a few more CPU +cycles ;)
+
+If the only reason you want the Active Desktop’s "Show Web Content" +to be enabled is because you have wallpaper that won’t display with out it, +then see the FAQ section of this help file for "Converting my wallpaper +image to a Windows Bitmap (BMP)"

+ +

Enable Logging
+For troubleshooting purposes I have added the ability for Simply Transparent to +log its actions.  If you have any issues +include the log in your email.
+When checked a log will be kept in your “My Documents” folder and will be +called: “Simply Transparent Log.txt”.  +When this is not checked all logging events are ignored.

+ +

Show icon in system tray
+Simply Transparent 7 now supports the removal of its icon from the system tray.
+When this option is checked the icon is shown in the system tray.  When this option is not checked the icon is +removed from the system tray.
+
+Transparency Lock Method: Advanced button
+This button will display the Transparency Lock method window, allowing you to +choose the best lock method for your computer.

+ +
+ + + + diff --git a/App/Simply Transparent/Help/Readme.htm b/App/Simply Transparent/Help/Readme.htm new file mode 100755 index 0000000..bc64556 --- /dev/null +++ b/App/Simply Transparent/Help/Readme.htm @@ -0,0 +1,218 @@ + + + + +Introduction: + + + + + +
+ +

Introduction:
+Picture this: You have an awesome background picture on your +desktop but you can't see half of it because your icon labels cover +it up!  Setting the background color doesn't help...so, what are you going +to do?  That is were this program will help.  It will remove all +the ugly opaque text boxes that appear under the icons on your desktop.

+ +

Known Issues:

+ +

If you switch lock methods from +Brute Force to Advanced...icons may not be set transparent.  Just refresh your desktop to nudge it :)

+ +

Revision History:

+ +

[Version 7.0 Release]
+- All previous code scrapped, started over from scratch

+ +

- No more overhead memory and CPU +usage

+ +

- Interface redesigned

+ +

- Reworded many options and +viewable text

+ +

- Drastically smaller footprint

+ +

- Pure C++, no helper libraries +such as MFC

+ +

- Windows2000/NT now fully +supported

+ +

- Smarter Advanced Mode

+ +

- Added “Show tray icon” option
+- Added logging

+ +

- Dropped “Hide icons when double +click, show when right-click”

+ +

- Operating System Aware

+ +

- New Art
+- runs in idle priority
+- Written with strict coding practices
+- More user friendly (first run gives information)
+
+[Version 6.5 Release]
+- Even better way of handling the "Windows-key + D" glitch
+- More Active Desktop Friendly (But still not buddies yet)
+- Interface tweaks
+- New Options
+- Corrected errors in documentation
+- More stable than v6.2
+- Tray icon will not disappear if the shell restarts or crashes
+- And more...

+ +

[Version 6.4 Beta]
+- Better way of handling the "Windows-key + D" (Minimize all) glitch

+ +

[Version 6.2 Release]
+- Cosmetic Tweaks
+- Fixed error message: Missing export in shell32.dll
+- Some minor tweaks

+ +

[Version 6.1 Release]
+-Fixed the "Windows Key + D" (Minimize all shortcut key) glitch
+-Fixed most Active Desktop issues

+ +

[Version 6.0 Release]
+- Executable's file sizes were greatly reduced
+- Rewrote res_x86.dll (the core of Simply Transparent) ...again
+- Much, MUCH, MUCH more stable
+- Internal reorganization...
+- Interface changes...
+- Fixed some typos in the help...
+- Removed some menu items
+- Redesigned the Update code...now it works
+- New installer...smaller download size
+- New Help system
+- New Features

+ +

[Version 5.0 Release]
+- Rewrote res_x86.dll (the core of Simply Transparent)
+- Much, MUCH more stable
+- Most the changes are internal...so the interface looks the same...
+- Fixed a typo in the menu...
+- Removed command-line switch "/exit"

+ +

[Version 4.1 Release]
+- More friendly
+- You can cancel the Update downloads
+- Help pages Updated
+- some minor bug fixes (A debug message box was left in the release code of Tool_x86.dll)

+ +

[Version 4.0 Release]
+- Totally rewrote Tray Icon object
+- Updated both methods of Transparency Locking
+- Added Help
+- Added a method to check for updates
+- Reworked program logic to run way smother
+- Compiler set to optimize for Pentium Pro like processors
+- A bunch of bug fixes

+ +

[Version 3.1 Beta]
+- Added more options
+- Minor changes
+- Recoded some functions to work smoother

+ +

[Version 3.0 Release]
+- Added more options
+- Minor changes in resources and in core to make more stable
+- Only allow one instance of Simply Transparent to run at a time

+ +

[Version 2.0 Beta]
+- Fixed: transparency not sticking after you refresh or changes desktop +settings
+- Reorganized code and reoptimized
+- Separated each task into it's own object

+ +

[Version 1.5 Beta]
+- Added command-line switch "/exit"
+- Added Splashscreen and about screen
+- Changed icons

+ +

[Version 1.0 Beta]
+- Created system tray icon
+- Implemented a menu for the tray icon

+ +

[Version 0.01 Alpha]
+- Implemented methods to make desktop background color transparent
+- It Works!!!

+ + +
+ +
+ +
+ + +

If you like this program, you are in luck! I have more!
+Visit my web page @ http://www.jonathangrimes.com to find out more.

+ +
+ + + + diff --git a/App/Simply Transparent/Help/Requirements.htm b/App/Simply Transparent/Help/Requirements.htm new file mode 100755 index 0000000..fc5a73f --- /dev/null +++ b/App/Simply Transparent/Help/Requirements.htm @@ -0,0 +1,105 @@ + + + + +Requirements + + + + + +
+ +

Requirements

+ +

 

+ +

To use Simply Transparent you will need to have:

+ +

 

+ +

1.      +Microsoft Windows 95*, 98, 98SE, ME, NT4*, or 2000
+**WindowsXP and later are not supported

+ +

2.      +2MB free Hard disk space for files.

+ +

3.      +One awesome Wallpaper ;)

+ +

 

+ +

* Note: Users of Windows95 and NT4 will have to have had the +Desktop Update from Internet Explorer4 installed.  See Troubleshooting.

+ +

 

+ +

** Attention: Users of WindowsXP, you do not need this +program! WindowsXP natively supports transparent icon labels.

+ +
+ + + + diff --git a/App/Simply Transparent/Help/Set Text Color Window.htm b/App/Simply Transparent/Help/Set Text Color Window.htm new file mode 100755 index 0000000..fe07814 --- /dev/null +++ b/App/Simply Transparent/Help/Set Text Color Window.htm @@ -0,0 +1,69 @@ + + + + +Set Text Color Window + + + + + +
+ +

Set Text Color Window

+ +

 

+ +

+

+ +


+Choose the color you want your icon labels to be.

+ +
+ + + + diff --git a/App/Simply Transparent/Help/SimplyTransparent.hhp b/App/Simply Transparent/Help/SimplyTransparent.hhp new file mode 100755 index 0000000..fd8e6c1 --- /dev/null +++ b/App/Simply Transparent/Help/SimplyTransparent.hhp @@ -0,0 +1,39 @@ +[OPTIONS] +Auto Index=Yes +Compatibility=1.1 or later +Compiled file=..\..\SimplyTransparent.chm +Contents file=Table of Contents.hhc +Default Font=Tahoma,8,0 +Default Window=Main +Default topic=Welcome.htm +Display compile progress=No +Enhanced decompilation=Yes +Full-text search=Yes +Index file=Index.hhk +Language=0x409 English (United States) +Title=Simply Transparent + +[WINDOWS] +Main="Simply Transparent 7 Help","Table of Contents.hhc","Index.hhk","Welcome.htm","Welcome.htm","FAQ.htm","FAQ","Readme.htm","Readme",0x2520,185,0xc3046,[1,1,806,481],0x908b0000,,,,,,0 + + +[FILES] +Version History.htm +Advanced Icon Hiding Options.htm +Checking for Updates.htm +Contact Information.htm +FAQ.htm +Introduction.htm +Known Issues.htm +Lock Method.htm +Options.htm +Readme.htm +Set Text Color Window.htm +The Menu.htm +Troubleshooting.htm +About Box.htm +Welcome.htm +Requirements.htm + +[INFOTYPES] + diff --git a/App/Simply Transparent/Help/Table of Contents.hhc b/App/Simply Transparent/Help/Table of Contents.hhc new file mode 100755 index 0000000..d7ddaeb --- /dev/null +++ b/App/Simply Transparent/Help/Table of Contents.hhc @@ -0,0 +1,89 @@ + + + + + + + + + + +
    +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + +
      +
    • + + + +
    • + + + +
        +
      • + + + +
      • + + + +
      • + + + +
      +
    • + + + +
    +
  • + + +
      +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    +
  • + + + +
+ diff --git a/App/Simply Transparent/Help/The Menu.htm b/App/Simply Transparent/Help/The Menu.htm new file mode 100755 index 0000000..f745f70 --- /dev/null +++ b/App/Simply Transparent/Help/The Menu.htm @@ -0,0 +1,115 @@ + + + + +The Menu + + + + + +
+ +

The Menu

+ +

+ +

+ +

By Jonathan Grimes
+This doesn't "do" any thing.  This is only cosmetic.

+ +

About Simply Transparent...
+This will cause the about box to popup.

+ +

Help
+This will cause the Help window to popup.

+ +

Check for Updates
+This will cause Simply Transparent to check to see if there is a newer version.

+ +

Set Text Color
+This will cause a Color Selection box to popup.  Your color +selection will be applied to the text color of the desktop icons.

+ +

Options...
+This will bring up the Simply Transparent Options window.

+ +

Show Splash with Simply Transparent Startup
+This option is a toggle.  When checked, a splash screen will be displayed +when Simply Transparent starts.

+ +

Start with Windows
+This option is a toggle.  When checked, Simply Transparent will start with +windows.

+ +

Beginner Mode (Asks more Questions)
+This option is a toggle.  When checked, Simply Transparent will prompt you +in times were you might want to be double-checked. Ex: If you click on Exit, it +will prompt you if you really wanted to click Exit or if you were tying to +click the menu item next to it.

+ +

Exit
+This will restore windows default colors and exit Simply Transparent.

+ +
+ + + + diff --git a/App/Simply Transparent/Help/Troubleshooting.htm b/App/Simply Transparent/Help/Troubleshooting.htm new file mode 100755 index 0000000..fa91621 --- /dev/null +++ b/App/Simply Transparent/Help/Troubleshooting.htm @@ -0,0 +1,85 @@ + + + + +Troubleshooting + + + + + +
+ +

Troubleshooting

+ +

 

+ +

If you are having trouble +and believe that Simply Transparent 7 may be causing it don’t change +anything.  First, disable “Start with +Windows” and then close Simply Transparent.  +If your problem goes away after you do this then enable the Simply +Transparent log and try to reproduce your problem.  When you do, contact me and include the log.

+ +

 

+ +
+ + + + diff --git a/App/Simply Transparent/Help/Version History.htm b/App/Simply Transparent/Help/Version History.htm new file mode 100755 index 0000000..4c8a68a --- /dev/null +++ b/App/Simply Transparent/Help/Version History.htm @@ -0,0 +1,268 @@ + + + + +Version History + + + + + +
+ +

Version History

+ +

 

+ +

[Version 7.0 Release]
+- All previous code scrapped, started over from scratch

+ +

- No more overhead memory and CPU usage

+ +

- Interface redesigned

+ +

- Reworded many options and viewable text

+ +

- Drastically smaller footprint

+ +

- Pure C++, no helper libraries such as MFC

+ +

- Windows2000/NT now fully supported

+ +

- Smarter Advanced Mode

+ +

- Added “Show tray icon” option
+- Added logging

+ +

- Dropped “Hide icons when double click, show when +right-click”

+ +

- Operating System Aware

+ +

- New Art
+- runs in idle priority
+- Written with strict coding practices
+- More user friendly (first run gives information)

+ +

 

+ +

[Version 6.5 Release]

+ +

- Even better way of handling the "Windows-key + D" glitch

+ +

- More Active Desktop Friendly (But still not buddies yet)

+ +

- Interface tweaks

+ +

- New Options

+ +

- Corrected errors in documentation

+ +

- More stable than v6.2

+ +

- Tray icon will not disappear if the shell restarts or +crashes

+ +

- And more...

+ +

 

+ +

[Version 6.4 Beta]

+ +

- Better way of handling the "Windows-key + D" (Minimize all) glitch

+ +

 

+ +

[Version 6.2 Release]

+ +

- Cosmetic Tweaks

+ +

- Fixed error message: Missing export in shell32.dll

+ +

- Some minor tweaks

+ +

 

+ +

[Version 6.1 Release]

+ +

-Fixed the "Windows Key + D" (Minimize all +shortcut key) glitch

+ +

-Fixed most Active Desktop issues

+ +

 

+ +

[Version 6.0 Release]

+ +

- Executable's file sizes were greatly reduced.

+ +

- Rewrote res_x86.dll (the core of Simply Transparent) +...again

+ +

- Much, MUCH, MUCH more stable

+ +

- Internal reorganization...

+ +

- Interface changes...

+ +

- Fixed some typos in the help...

+ +

- Removed some menu items

+ +

- Redesigned the Update code...now it works :-P

+ +

- New installer...smaller downloads size.

+ +

- New Help system

+ +

- New Features

+ +

 

+ +

[Version 5.0 Release]

+ +

- Rewrote res_x86.dll (the core of Simply Transparent)

+ +

- Much, MUCH more stable

+ +

- Most the changes are internal...so the interface looks the same...

+ +

- Fixed a typo in the menu...

+ +

- Removed command-line switch "/exit"

+ +

 

+ +

 

+ +

[Version 4.1 Release]

+ +

- More friendly

+ +

- You can cancel the Update downloads

+ +

- Help pages Updated

+ +

- Some minor bug fixes. (A debug message box was left in the release code of Tool_x86.dll)

+ +

 

+ +

[Version 4.0 Release]

+ +

- Totally rewrote Tray Icon object

+ +

- Updated both methods of Transparency Locking

+ +

- Added Help

+ +

- Added a method to check for updates

+ +

- Reworked program logic to run way smother

+ +

- Compiler set to optimize for Pentium Pro like processors

+ +

- A bunch of bug fixes.

+ +

 

+ +

[Version 3.1 Beta]

+ +

- Added more options.

+ +

- Minor changes.

+ +

- Recoded some functions to work smoother.

+ +

 

+ +

[Version 3.0 Release]

+ +

- Added more options.

+ +

- Minor changes in resources and in core to make more stable.

+ +

- Only allow one instance of Simply Transparent to run at a time.

+ +

 

+ +

[Version 2.0 Beta]

+ +

- Fixed Transparency not sticking after you refresh or changes desktop settings.

+ +

- Reorganized code and further optimized

+ +

- Separated each task into it's own object

+ +

 

+ +

[Version 1.5 Beta]

+ +

- Added command-line switch "/exit"

+ +

- Added Splash screen and about screen

+ +

- Changed icons

+ +

 

+ +

[Version 1.0 Beta]

+ +

- Created system tray icon

+ +

- Implemented a menu for the tray icon

+ +

 

+ +

[Version 0.01 Alpha]

+ +

- Implemented methods to make desktop background color transparent

+ +

- It Works!!!

+ +
+ + + + diff --git a/App/Simply Transparent/Help/Welcome.htm b/App/Simply Transparent/Help/Welcome.htm new file mode 100755 index 0000000..eefddb5 --- /dev/null +++ b/App/Simply Transparent/Help/Welcome.htm @@ -0,0 +1,98 @@ + + + + +Welcome + + + + + +
+ +

Welcome

+ +

 

+ +

Welcome to the coolest desktop enhancement made by Jonathan Grimes!

+ +

This program makes the background color of your desktop's non-selected icons +transparent! Never again will you have awesome wallpaper and have it obstructed +by you icons!

+ + +
+ +
+ +
+ + +

Simply Transparent
+Copyright (C) 2000 Jonathan Grimes
+
+Beta Tested by Brian Schettler

+ +
+ + + + diff --git a/App/Simply Transparent/Help/backdrop.jpg b/App/Simply Transparent/Help/backdrop.jpg new file mode 100755 index 0000000..3052efe Binary files /dev/null and b/App/Simply Transparent/Help/backdrop.jpg differ diff --git a/App/Simply Transparent/Options.cpp b/App/Simply Transparent/Options.cpp new file mode 100755 index 0000000..6987d2f --- /dev/null +++ b/App/Simply Transparent/Options.cpp @@ -0,0 +1,469 @@ +/////////////////////////////////////////////////////////////////////////////// +//// Options.cpp +// + +#include "stdafx.h" +#include "SimplyTransparent.h" +#include "options.h" + + +LRESULT CALLBACK ChooseLockMethodProc(HWND, UINT, WPARAM, LPARAM ); +LRESULT CALLBACK SetAdvancedIconOptionsProc(HWND, UINT, WPARAM, LPARAM ); +LRESULT CALLBACK OptionsProc(HWND, UINT, WPARAM, LPARAM ); + +/////////////////////////////////////////////////////////////////////////////// +//// Options Caller Definition +// +int Options( HWND hWnd ) +{ + int nRet = DialogBox( GetMyInstanceHandle(), (LPCTSTR)IDD_OPTIONS, + hWnd, (DLGPROC)OptionsProc); + + if( nRet == IDOK )__Comment ( "Options ended with IDOK" ); + else __Comment ( "Options ended with !IDOK...assumed IDCANCEL" ); + + return nRet; +} + + + +/////////////////////////////////////////////////////////////////////////////// +///// Choose Lock Method Box Caller Definition +// +static int ChooseLockMethod( HWND hWnd ) +{ + int nRet = DialogBox( GetMyInstanceHandle(), (LPCTSTR)IDD_METHOD, + hWnd, (DLGPROC)ChooseLockMethodProc ); + + if( nRet == IDOK )__Comment ( "Choose Lock Method ended with IDOK" ); + else __Comment ( "Choose Lock Method ended with !IDOK...assumed IDCANCEL" ); + + return nRet; +} + + + +/////////////////////////////////////////////////////////////////////////////// +///// Advanced Icon Options Box Caller Definition +// +static int SetAdvancedIconOptions( HWND hWnd ) +{ + int nRet = DialogBox( GetMyInstanceHandle(), (LPCTSTR)IDD_HI_ADVANCED, + hWnd, (DLGPROC)SetAdvancedIconOptionsProc ); + + if( nRet == IDOK )__Comment ( "Advanced Icon Options ended with IDOK" ); + else __Comment ( "Advanced Icon Options ended with !IDOK...assumed IDCANCEL" ); + + return nRet; +} + + +static void EnableIconOptions( HWND hDlg, BOOL bEnable ) +{ + EnableWindow( GetDlgItem( hDlg, ID_ICONHIDE_ADVANCE ), bEnable ); + EnableWindow( GetDlgItem( hDlg, IDC_ICON_HIDE_METHOD ), bEnable ); + EnableWindow( GetDlgItem( hDlg, IDC_ICON_HIDE_METHOD2), bEnable ); +} + +static void EnableHottrackOptions( HWND hDlg, BOOL bEnable ) +{ + EnableWindow( GetDlgItem( hDlg, IDC_HOVER_TIME ), bEnable ); + EnableWindow( GetDlgItem( hDlg, IDC_TRACKMETHOD ), bEnable ); + EnableWindow( GetDlgItem( hDlg, IDC_TRACKMETHOD2 ), bEnable ); + EnableWindow( GetDlgItem( hDlg, IDC_TRACKMETHOD3 ), bEnable ); +} + +static void SetIconOption( HWND hDlg, unsigned int nOption ) +{ + const unsigned int nFirst = IDC_ICON_HIDE_METHOD; + const unsigned int nLast = IDC_ICON_HIDE_METHOD2; + const unsigned int nTotal = nLast - nFirst; + + //if( nOption <= nTotal ){ + + CheckRadioButton( hDlg, nFirst, nLast, + nFirst + nOption - 1 ); + + //} +} + +static int GetIconOption( HWND hDlg ) +{ + const unsigned int nFirst = IDC_ICON_HIDE_METHOD; + const unsigned int nLast = IDC_ICON_HIDE_METHOD2; + + for( unsigned int x = nFirst; x <= nLast; x++ ) + { + if( IsDlgButtonChecked( hDlg, x ) ) + return ( x - nFirst + 1 ); + } + + return 0; +} + + +static void SetHotTrkOption( HWND hDlg, unsigned int nOption ) +{ + const unsigned int nFirst = IDC_TRACKMETHOD; + const unsigned int nLast = IDC_TRACKMETHOD3; + const unsigned int nTotal = nLast - nFirst; + + //if( nOption <= nTotal ){ + + CheckRadioButton( hDlg, nFirst, nLast, + nFirst + nOption - 1 ); + + //} +} + +static int GetHotTrkOption( HWND hDlg ) +{ + const unsigned int nFirst = IDC_TRACKMETHOD; + const unsigned int nLast = IDC_TRACKMETHOD3; + + for( unsigned int x = nFirst; x <= nLast; x++ ) + { + if( IsDlgButtonChecked( hDlg, x ) ) + return ( x - nFirst + 1 ); + } + + return 0; +} + + + +/////////////////////////////////////////////////////////////////////////////// +///// Options Box Proc +// +LRESULT CALLBACK OptionsProc(HWND hDlg, UINT message, WPARAM wParam, + LPARAM lParam) +{ + static COLORREF textcolor; + + switch (message) + { + case WM_INITDIALOG: + { + __Comment ( "Loading Options Box Resourses" ); + + textcolor = ReadRGBSetting( "res_x86", "textcolor", "255,255,255" ); + + char temp[MAX_PATH]; + + sprintf( temp, "%d", + ReadIntSetting( "res_x86", "HoverTime", HOVERTIME ) ); + SetWindowText( GetDlgItem( hDlg, IDC_HOVER_TIME ), temp ); + + CheckDlgButton( hDlg, IDC_ICON_HIDE, + ( ReadIntSetting( "res_x86", "IHmethod", ICONHIDE_METHOD ) ) + ? BST_CHECKED : BST_UNCHECKED ); + EnableIconOptions( hDlg, + IsDlgButtonChecked( hDlg, IDC_ICON_HIDE ) ); + + + + CheckDlgButton( hDlg, IDC_HOT_TRACKING, + ( ReadIntSetting( "res_x86", "HoverEffect", HOVEREFFECT ) ) + ? BST_CHECKED : BST_UNCHECKED ); + EnableHottrackOptions( hDlg, + IsDlgButtonChecked( hDlg, IDC_HOT_TRACKING ) ); + + + SetIconOption( hDlg, + ReadIntSetting( "res_x86", "IHmethod", ICONHIDE_METHOD ) ); + + + SetHotTrkOption( hDlg, + ReadIntSetting( "res_x86", "HoverEffect", HOVEREFFECT ) ); + + + CheckDlgButton( hDlg, ID_ADPOLL, + ( ReadIntSetting( "", "ADpoll", ACTIVEDESKTOP_POLLING ) ) + ? BST_CHECKED : BST_UNCHECKED ); + + CheckDlgButton( hDlg, IDC_LOGGING, + ( ReadIntSetting( "", "Logging", LOGGING ) ) + ? BST_CHECKED : BST_UNCHECKED ); + + CheckDlgButton( hDlg, IDC_SHOWICON, + ( ReadIntSetting( "", "TrayIcon", TRAYICON ) ) + ? BST_CHECKED : BST_UNCHECKED ); + + + sprintf( temp, "Currently using: %s method", + ReadIntSetting( "", "Lockmeth", LOCKMETHOD ) + ? "Advanced" : "Brute Force" ); + SetWindowText( GetDlgItem( hDlg, IDC_METHODMESSAGE ), temp ); + + EnableWindow( GetDlgItem( hDlg, IDC_LOCKMETHOD ), _IsRes_x86Loaded( ) ); + + __AnimateWindow( hDlg, 200, AW_ACTIVATE|AW_BLEND ); + ShowWindow( hDlg, SW_SHOW ); + InvalidateRect( hDlg, 0, true ); + + } + + return TRUE; + + + case WM_COMMAND: + + switch( LOWORD( wParam ) ) + { + case IDOK: + { + //Add save code here + char time[MAX_PATH]; + GetWindowText( GetDlgItem( hDlg, IDC_HOVER_TIME ), + time, MAX_PATH ); + + int x = IsDlgButtonChecked( hDlg, IDC_ICON_HIDE ); + if( x ) x = GetIconOption( hDlg ); + else x = 0; + WriteIntSetting( "res_x86", "IHmethod", x ); + + x = IsDlgButtonChecked( hDlg, IDC_HOT_TRACKING ); + if( x ) x = GetHotTrkOption( hDlg ); + else x = 0; + WriteIntSetting( "res_x86", "HoverEffect", x ); + + x = atoi( time ); + WriteIntSetting( "res_x86", "HoverTime", x ); + + x = IsDlgButtonChecked( hDlg, ID_ADPOLL ); + WriteIntSetting( "", "ADpoll", x ); + + x = IsDlgButtonChecked( hDlg, IDC_LOGGING ); + WriteIntSetting( "", "Logging", x ); + + x = IsDlgButtonChecked( hDlg, IDC_SHOWICON ); + if( ReadIntSetting( "res_x86", "IHmethod", ICONHIDE_METHOD ) == 2 ) + x = 1; + WriteIntSetting( "", "TrayIcon", x ); + + } + case IDCANCEL: + __Comment ( "Closing Options Box" ); + EndDialog(hDlg, LOWORD( wParam )); + return TRUE; + + case IDC_LOCKMETHOD: + if( ChooseLockMethod( hDlg ) == IDOK ){ + EnableWindow( GetDlgItem( hDlg, IDCANCEL ), false ); + + char temp[MAX_PATH]; + sprintf( temp, "Currently using: %s method", + ReadIntSetting( "", "Lockmeth", LOCKMETHOD ) + ? "Advanced" : "Brute Force" ); + SetWindowText( GetDlgItem( hDlg, IDC_METHODMESSAGE ), temp ); + + EnableIconOptions( hDlg, + ( IsDlgButtonChecked( hDlg, IDC_ICON_HIDE ) ) ); + if( GetIconOption( hDlg ) == 1 ) + SetIconOption( hDlg, 0 ); + + } + break; + case IDC_TEXTCOLOR: + { + DWORD dwCustClrs [16]; + for ( int i = 0; i < 16; i++ ) + dwCustClrs [i] = _WHITE; + + + CHOOSECOLOR color; + ZeroMemory( &color, sizeof( CHOOSECOLOR ) ); + color.lStructSize = sizeof( CHOOSECOLOR ); + color.Flags = CC_RGBINIT|CC_ENABLEHOOK; + color.rgbResult = textcolor; + color.hwndOwner = hDlg; + color.lpCustColors = ( LPDWORD )dwCustClrs; + color.lCustData = 0L; + color.lpfnHook = CCHookProc; + + if( ChooseColor( &color ) ) + { + textcolor = color.rgbResult; + WriteRGBSetting( "res_x86", "textcolor", textcolor ); + } + + } + break; + + case ID_ICONHIDE_ADVANCE: + if( SetAdvancedIconOptions( hDlg ) == IDOK ) + EnableWindow( GetDlgItem( hDlg, IDCANCEL ), false ); + break; + + case IDC_ICON_HIDE: + EnableIconOptions( hDlg, + ( IsDlgButtonChecked( hDlg, LOWORD( wParam ) ) ) ); + break; + + case IDC_HOT_TRACKING: + EnableHottrackOptions( hDlg, + ( IsDlgButtonChecked( hDlg, LOWORD( wParam ) ) ) ); + break; + + case IDC_ICON_HIDE_METHOD2: + CheckDlgButton( hDlg, IDC_SHOWICON, BST_CHECKED ); + break; + + } + return TRUE; + + } + return FALSE; +} + + + +/////////////////////////////////////////////////////////////////////////////// +///// Choose Lock Method Box Proc Definition +// +LRESULT CALLBACK ChooseLockMethodProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch (message) + { + case WM_INITDIALOG: + { + __Comment ( "Loading Lock Method Box Resourses" ); + + //IDC_METHOD + //IDC_METHOD2 + //IDC_TIMEOUT + + char time[MAX_PATH]; + sprintf( time, "%d", + ReadIntSetting( "", "LockMeth1Time", LOCKMETHODTIME ) ); + SetWindowText( GetDlgItem( hDlg, IDC_TIMEOUT ), time ); + + int meth = ReadIntSetting( "", "Lockmeth", LOCKMETHOD ); + CheckRadioButton( hDlg, IDC_METHOD, IDC_METHOD2, + IDC_METHOD + meth ); + + EnableWindow( GetDlgItem( hDlg, IDC_METHOD ), true ); + EnableWindow( GetDlgItem( hDlg, IDC_METHOD2 ), true ); + + EnableWindow( GetDlgItem( hDlg, IDC_TIMEOUT ), + ( meth == 0 ) ? true : false ); + + __AnimateWindow( hDlg, 200, AW_ACTIVATE|AW_BLEND ); + ShowWindow( hDlg, SW_SHOW ); + InvalidateRect( hDlg, 0, true ); + + } + return TRUE; + + + case WM_COMMAND: + + switch( LOWORD(wParam) ) + { + case IDOK: + { + char time[MAX_PATH]; + GetWindowText( GetDlgItem( hDlg, IDC_TIMEOUT ), + time, MAX_PATH ); + + int z = atoi( time ); + WriteSetting( "", "LockMeth1Time", &z ); + + for( unsigned int x = IDC_METHOD; x <= IDC_METHOD2; x++ ) + { + if( IsDlgButtonChecked( hDlg, x ) ) + z = ( x - IDC_METHOD ); + } + WriteIntSetting( "", "Lockmeth", z ); + + + } + case IDCANCEL: + __Comment ( "Closing Lock Method Box" ); + EndDialog(hDlg, LOWORD(wParam)); + return TRUE; + + case IDC_METHOD: + EnableWindow( GetDlgItem( hDlg, IDC_TIMEOUT ), true ); + break; + + case IDC_METHOD2: + EnableWindow( GetDlgItem( hDlg, IDC_TIMEOUT ), false ); + break; + + } + break; + + + } + return FALSE; +} + + + +/////////////////////////////////////////////////////////////////////////////// +///// Advanced Icon Options Box Proc Definition +// +LRESULT CALLBACK SetAdvancedIconOptionsProc(HWND hDlg, UINT message, + WPARAM wParam, + LPARAM lParam) +{ + switch (message) + { + case WM_INITDIALOG: + { + __Comment ( "Loading Advanced Icon Options Box Resourses" ); + + CheckDlgButton( hDlg, IDC_SHOWBUTTON, + ( ReadIntSetting( "res_x86", "IHButton", ICONHIDE_BUTTON ) ) + ? BST_CHECKED : BST_UNCHECKED ); + + SendMessage( GetDlgItem( hDlg, IDC_RESPONSIVE ), + TBM_SETRANGEMIN, 1, 1); + + SendMessage( GetDlgItem( hDlg, IDC_RESPONSIVE ), + TBM_SETRANGEMAX, 1, 1000); + + + SendMessage( GetDlgItem( hDlg, IDC_RESPONSIVE ), + TBM_SETPOS, 1, + ReadIntSetting( "res_x86", "IHRespon", ICONHIDE_RESPON ) ); + + __AnimateWindow( hDlg, 200, AW_ACTIVATE|AW_BLEND ); + ShowWindow( hDlg, SW_SHOW ); + InvalidateRect( hDlg, 0, true ); + + } + return TRUE; + + + case WM_COMMAND: + + switch( LOWORD(wParam) ) + { + case IDOK: + { + + int x = (int)SendMessage( GetDlgItem( hDlg, IDC_RESPONSIVE ), + TBM_GETPOS, 0, 0l); + WriteIntSetting( "res_x86", "IHRespon", x ); + + + x = IsDlgButtonChecked( hDlg, IDC_SHOWBUTTON ); + WriteIntSetting( "res_x86", "IHButton", x ); + + + } + + case IDCANCEL: + __Comment ( "Closing Advanced Icon Options Box" ); + EndDialog(hDlg, LOWORD(wParam)); + return TRUE; + + } + break; + + + } + return FALSE; +} diff --git a/App/Simply Transparent/Options.h b/App/Simply Transparent/Options.h new file mode 100755 index 0000000..e7ffdd0 --- /dev/null +++ b/App/Simply Transparent/Options.h @@ -0,0 +1,24 @@ +/////////////////////////////////////////////////////////////////////////////// +//// Options.h +// + +#ifndef ___OPTIONS_H_____ +#define ___OPTIONS_H_____ + + +#define HOVEREFFECT 0 +#define HOVERTIME 780 +#define ICONHIDE_METHOD 0 +#define ICONHIDE_RESPON 500 +#define ICONHIDE_BUTTON 0 +#define ACTIVEDESKTOP_POLLING 1 +#define LOGGING 0 +#define TRAYICON 1 +#define LOCKMETHOD 1 +#define LOCKMETHODTIME 20 +#define SPLASH 1 +#define NEWUSER 1 + +int Options( HWND hWnd ); + +#endif //___OPTIONS_H_____ \ No newline at end of file diff --git a/App/Simply Transparent/SimplyTransparent.aps b/App/Simply Transparent/SimplyTransparent.aps new file mode 100755 index 0000000..9ed5e03 Binary files /dev/null and b/App/Simply Transparent/SimplyTransparent.aps differ diff --git a/7/SimplyTransparent.clw b/App/Simply Transparent/SimplyTransparent.clw old mode 100644 new mode 100755 similarity index 100% rename from 7/SimplyTransparent.clw rename to App/Simply Transparent/SimplyTransparent.clw diff --git a/App/Simply Transparent/SimplyTransparent.cpp b/App/Simply Transparent/SimplyTransparent.cpp new file mode 100755 index 0000000..dd48530 --- /dev/null +++ b/App/Simply Transparent/SimplyTransparent.cpp @@ -0,0 +1,781 @@ +/////////////////////////////////////////////////////////////////////////////// +//// SimplyTransparent.cpp : Defines the entry point +// + +#include "stdafx.h" +#include "SimplyTransparent.h" +#include "main.h" +#include "_Splash.h" + +#include +#include "getwnd.h" + +BOOL ExecuteCmdLineOptions( HINSTANCE hInstance, char* cmdline ); +LRESULT CALLBACK TrayBoxProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); + +/////////////////////////////////////////////////////////////////////////////// +//// The main app object... (one of the few global var's) +// +CMain *theApp = NULL; + +/////////////////////////////////////////////////////////////////////////////// +//// Main entry point +// +int APIENTRY WinMain( HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPSTR lpCmdLine, + int nCmdShow ) +{ + + if( ExecuteCmdLineOptions( hInstance, lpCmdLine ) ) + return 0; + + int nReturn; + + + if( ReadIntSetting( "", "Logging", LOGGING ) ) + _InitLogger( );//Enable log + + + if( IsWindowsNT( ) ) + __Comment( "Running on NT" ); + + //Splashscreen code... + if( ReadIntSetting( "", "Splash", SPLASH ) + || ReadIntSetting( "", "FirstRun", 1 ) ) + Splash( hInstance ); + + + // Must create an object for the pointer + theApp = new CMain( hInstance, lpCmdLine ); + + + // initialize! + if ( theApp->InitInstance ( ) ) + { + //Load settings + theApp->LoadSettings( ); + + if( ReadIntSetting( "", "FirstRun", 1 ) == 1 ) + { + theApp->LockInterface( CMain::lock ); + + char message[1024]; + + LoadString( hInstance, IDS_WELCOME, message, 1024 ); + + //Welcome message + __Message( message ); + + //About + theApp->OnAbout( ); + + //Options + theApp->OnOptions( ); + + //OnOptions unlocks the interface on return + theApp->LockInterface( CMain::lock ); + + //Tray icon awareness message + DialogBox( hInstance, (LPCTSTR)IDD_TRAYICON_AWARENESS, + GetMyWindowHandle( ), (DLGPROC)TrayBoxProc ); + + theApp->LockInterface( CMain::unlock ); + + WriteIntSetting( "", "FirstRun", 0 ); + } + + nReturn = theApp->Run();// Main message loop: + } + else + { + __Comment ( "theApp->InitInstance failed...exiting" ); + + nReturn = false; + + } + + __Comment ( "Shutdown Begin" ); + // from this point on...is the beginning of the end... ;) + + __Comment ( "Deleting CMain Object..." ); + delete theApp; + + // flush the log & close it. + _CloseLogger( ); + + return nReturn;// woo hoo! we're done! +} + +/////////////////////////////////////////////////////////////////////////////// +///// Main Box Proc +// +LRESULT CALLBACK WndProc( HWND hWnd, UINT message, + WPARAM wParam, LPARAM lParam ) +{ + int wmId, wmEvent; + + switch ( message ) + { + case WM_COMMAND: + wmId = LOWORD( wParam ); + wmEvent = HIWORD( wParam ); + //__Comment( "WM_COMMAND" ); + // Parse the menu selections: + switch ( wmId ) + { + case IDM_ABOUT: + theApp->OnAbout( ); + break; + + case ID_HELP: + theApp->OnHelp( ); + break; + + case ID_UPDATE: + theApp->OnUpdateCheck( ); + break; + + case ID_SET_TEXT_COLOR: + theApp->OnSettextcolor( ); + break; + + case ID_OPTIONS: + theApp->OnOptions( ); + break; + + case ID_SHOWSPLASH: + theApp->OnShowSplash( ); + break; + + case ID_STARTUP: + theApp->OnStartup( ); + break; + + case ID_BEGINNERMODE: + theApp->OnBeginnerMode( ); + break; + + case IDM_EXIT: + if( theApp->OnExit( ) ) + DestroyWindow( hWnd ); + break; + + + + default: + return DefWindowProc( hWnd, message, wParam, lParam ); + } + break; + + case WM_CLOSE: + case WM_QUIT: + case WM_ENDSESSION: + DestroyWindow(hWnd); + break; + + case WM_QUERYENDSESSION: + return theApp->OnQueryEndSession( ); + break; + + case WM_DESTROY: + PostQuitMessage( 0 ); + break; + + case WM_MY_BEGIN_EXIT_NOTIFICATION: + theApp->OnBeginExitNotification( wParam, lParam ); + break; + + case WM_MY_EXIT_NOTIFICATION: + theApp->OnExitNotification( wParam, lParam ); + break; + + case WM_SIMPLYTRANSPARENT_SETTEXTCOLOR: + theApp->OnRemoteSetTextColor( wParam, lParam ); + break; + + case WM_MY_RESTART_NOTIFICATION: + theApp->OnRestart( wParam, lParam ); + break; + + case WM_MY_SHOWTRAY_NOTIFICATION: + theApp->OnShowTrayNotification( wParam, lParam ); + break; + + case WM_SHOW_OPTIONS: + case WM_SHOW_TEXTCOLOR: + case WM_SHOW_ABOUT: + case WM_GET_UPDATES: + if( wParam == 577 && lParam == (LPARAM)hWnd ) + { + switch( message ) + { + case WM_SHOW_OPTIONS: + theApp->OnOptions( ); + break; + case WM_SHOW_TEXTCOLOR: + theApp->OnSettextcolor( ); + break; + case WM_SHOW_ABOUT: + theApp->OnAbout( ); + break; + case WM_GET_UPDATES: + theApp->OnUpdateCheck( ); + break; + default:break; + } + } + break; + + case WM_MY_TRAY_NOTIFICATION: + theApp->OnTrayNotification( wParam, lParam ); + break; + + case WM_TIMER: + theApp->OnTimer( wParam ); + break; + + default: + return DefWindowProc( hWnd, message, wParam, lParam ); + } + return 0; +} + + + + + + +/////////////////////////////////////////////////////////////////////////////// +///// About Box Proc +// +LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + const int about_msg_size = 400; + static BOOL bClick = false; + static BOOL bHover = false; + static HCURSOR old = LoadCursor( 0, IDC_ARROW ), + hand = LoadCursor( 0, IDC_HAND ); + static DWORD hoverText = 0; + + TCHAR about_message[about_msg_size]; + TCHAR paypal_message[(about_msg_size/2)]; + + PAINTSTRUCT ps; + HDC hdc; + HFONT norm, under; + HGDIOBJ hObj; + COLORREF oldtc; + UINT id[4] = { IDC_CONTACTME, IDC_VISITME, IDC_PRODUCTHOME, IDC_HELPME }; + int x; + + register POINT p; + register RECT rCon, rVis, rDon, rPro, rHelp, r; + + switch (message) + { + case WM_INITDIALOG: + __Comment ( "Loading AboutBox Resourses" ); + LoadString( theApp->GetInstanceHandle(), IDS_ABOUT, about_message, + about_msg_size ); + SetWindowText( GetDlgItem( hDlg, IDC_EDIT1 ) , about_message ); + + LoadString( theApp->GetInstanceHandle(), IDS_PAYPAL, paypal_message, + (about_msg_size/2) ); + SetWindowText( GetDlgItem( hDlg, IDC_PAYPAL_DONTATE ) , paypal_message ); + + UpdateWindow( hDlg ); + __AnimateWindow( hDlg, 200, AW_ACTIVATE|AW_BLEND ); + ShowWindow( hDlg, SW_SHOW ); + InvalidateRect( hDlg, 0, true ); + return TRUE; + + case WM_COMMAND: + switch( LOWORD(wParam) ) + { + case IDOK: + case IDCANCEL: + __Comment ( "Closing AboutBox" ); + KillTimer( hDlg, 1 ); + EndDialog(hDlg, LOWORD(wParam)); + return TRUE; + + case IDC_CONTACTME: + bClick = true; + + ShellExecute( GetMyWindowHandle( ), "open", "http://www.jonathangrimes.com/index.php?page=contact", 0, 0, SW_SHOWNORMAL ); + + Sleep( 300 ); + bClick = false; + break; + + case IDC_VISITME: + bClick = true; + ShellExecute( GetMyWindowHandle( ), "open", "http://www.jonathangrimes.com/index.php", 0, 0, SW_SHOWNORMAL ); + + Sleep( 300 ); + bClick = false; + break; + + case IDC_PRODUCTHOME: + bClick = true; + ShellExecute( GetMyWindowHandle( ), "open", "http://www.jonathangrimes.com/index.php?page=projects§ion=101", 0, 0, SW_SHOWNORMAL ); + + Sleep( 300 ); + bClick = false; + break; + + case IDC_HELPME: + bClick = true; + theApp->OnHelp( ); + + Sleep( 300 ); + bClick = false; + break; + + case IDC_PAY: + bClick = true; + ShellExecute( GetMyWindowHandle( ), "open", "http://www.jonathangrimes.com/donate.php", 0, 0, SW_SHOWNORMAL ); + + Sleep( 300 ); + bClick = false; + break; + } + + break; + + + case WM_PAINT: + hdc = BeginPaint(hDlg, &ps); + + oldtc = GetTextColor( hdc ); + + + + norm = CreateFont( + -MulDiv( 8, GetDeviceCaps(hdc, LOGPIXELSY), 72), + 0, + 0, + 0, + 400, + false, //italic + false, //underline + false, //strickout + DEFAULT_CHARSET, + OUT_DEFAULT_PRECIS, + CLIP_DEFAULT_PRECIS, + DEFAULT_QUALITY, //PROOF_QUALITY + DEFAULT_PITCH|FF_SWISS, + "Tahoma" );//"MS Sans Serif" + + under = CreateFont( + -MulDiv( 8, GetDeviceCaps(hdc, LOGPIXELSY), 72), + 0, + 0, + 0, + 800, + false, //italic + true, //underline + false, //strickout + DEFAULT_CHARSET, + OUT_DEFAULT_PRECIS, + CLIP_DEFAULT_PRECIS, + DEFAULT_QUALITY, //PROOF_QUALITY + DEFAULT_PITCH|FF_SWISS, + "Tahoma" );//"MS Sans Serif" + + + hObj = SelectObject( hdc, norm ); + SetBkMode( hdc, TRANSPARENT ); + + + for( x = 0; x<4; x++ ) + { + GetWindowRect( GetDlgItem( hDlg, id[x] ), &r ); + ScreenToClient( hDlg, &r ); + + if(hoverText == id[x] ) + { + SetTextColor( hdc, RGB( 102, 102, 255 ) ); + SelectObject( hdc, under ); + } + else + SetTextColor( hdc, RGB( 0, 51, 255 ) ); + + char text[50]; + LoadString( GetMyInstanceHandle( ), id[x], text, 50 ); + + TextOut( hdc, r.left, r.top, text, strlen( text ) ); + } + + + SetTextColor( hdc, oldtc ); + + SelectObject( hdc, hObj ); + + DeleteObject( norm ); + DeleteObject( under ); + + EndPaint(hDlg, &ps); + break; + + + case WM_MOUSELEAVE: + if( hoverText == IDC_CONTACTME) + InvalidateRect( hDlg, &rCon, true ); + if( hoverText == IDC_VISITME) + InvalidateRect( hDlg, &rVis, true ); + if( hoverText == IDC_PRODUCTHOME ) + InvalidateRect( hDlg, &rPro, true ); + if( hoverText == IDC_HELPME ) + InvalidateRect( hDlg, &rHelp, true ); + + hoverText = 0; + break; + + case WM_MOUSEMOVE: + case WM_LBUTTONUP: + case WM_MOUSEHOVER: + + bHover = true; + + p.x = GET_X_LPARAM(lParam); + p.y = GET_Y_LPARAM(lParam); + + GetWindowRect( GetDlgItem( hDlg, IDC_CONTACTME ), &rCon ); + ScreenToClient( hDlg, &rCon ); + + GetWindowRect( GetDlgItem( hDlg, IDC_VISITME ), &rVis ); + ScreenToClient( hDlg, &rVis ); + + GetWindowRect( GetDlgItem( hDlg, IDC_PRODUCTHOME ), &rPro ); + ScreenToClient( hDlg, &rPro ); + + GetWindowRect( GetDlgItem( hDlg, IDC_HELPME ), &rHelp ); + ScreenToClient( hDlg, &rHelp ); + + GetWindowRect( GetDlgItem( hDlg, IDC_PAY ), &rDon ); + ScreenToClient( hDlg, &rDon ); + + + if( IsPintInRect( &p, &rCon ) ) + { + if( hoverText != IDC_CONTACTME ) + { + hoverText = IDC_CONTACTME; + InvalidateRect( hDlg, &rCon, true ); + } + + SetCursor( hand ); + + if( message == WM_LBUTTONUP ) + SendMessage( hDlg, WM_COMMAND, IDC_CONTACTME,0 ); + + } + + else if( IsPintInRect( &p, &rVis ) ) + { + if( hoverText != IDC_VISITME ) + { + hoverText = IDC_VISITME; + InvalidateRect( hDlg, &rVis, true ); + } + SetCursor( hand ); + + if( message == WM_LBUTTONUP ) + SendMessage( hDlg, WM_COMMAND, IDC_VISITME,0 ); + } + + else if( IsPintInRect( &p, &rPro ) ) + { + if( hoverText != IDC_PRODUCTHOME ) + { + hoverText = IDC_PRODUCTHOME; + InvalidateRect( hDlg, &rPro, true ); + } + + SetCursor( hand ); + + if( message == WM_LBUTTONUP ) + SendMessage( hDlg, WM_COMMAND, IDC_PRODUCTHOME,0 ); + } + + else if( IsPintInRect( &p, &rHelp ) ) + { + if( hoverText != IDC_HELPME ) + { + hoverText = IDC_HELPME; + InvalidateRect( hDlg, &rHelp, true ); + } + SetCursor( hand ); + + if( message == WM_LBUTTONUP ) + SendMessage( hDlg, WM_COMMAND, IDC_HELPME,0 ); + } + + else + { + + if( hoverText == IDC_CONTACTME ) + InvalidateRect( hDlg, &rCon, true ); + if( hoverText == IDC_VISITME ) + InvalidateRect( hDlg, &rVis, true ); + if( hoverText == IDC_PRODUCTHOME ) + InvalidateRect( hDlg, &rPro, true ); + if( hoverText == IDC_HELPME ) + InvalidateRect( hDlg, &rHelp, true ); + + hoverText = 0; + + if( IsPintInRect( &p, &rDon ) ) + { + SetCursor( hand ); + + if( message == WM_LBUTTONUP ) + SendMessage( hDlg, WM_COMMAND, IDC_PAY,0 ); + } + else + { + bHover = false; + SetCursor( old ); + } + } + + + return true; + + case WM_SETCURSOR: + + if(bHover) + { + SetCursor( hand ); + return true; + } + + + + break; + + } + return FALSE; +} + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +///// About Box Proc +// +LRESULT CALLBACK TrayBoxProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + + TCHAR msg[400]; + + switch( message ) + { + case WM_INITDIALOG: + LoadString( theApp->GetInstanceHandle(), IDS_TRAY_AWARNESS, msg, + 400 ); + SetWindowText( GetDlgItem( hDlg, IDC_TRAYMESSAGE ) , msg ); + + __AnimateWindow( hDlg, 200, AW_ACTIVATE|AW_BLEND ); + ShowWindow( hDlg, SW_SHOW ); + InvalidateRect( hDlg, 0, true ); + break; + + case WM_COMMAND: + if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) + { + __AnimateWindow( hDlg, 200, AW_HIDE|AW_BLEND ); + __Comment ( "Closing AboutBox" ); + KillTimer( hDlg, 1 ); + EndDialog(hDlg, LOWORD(wParam)); + return TRUE; + } + break; + } + return false; +} + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +///// if ST already running...tell it to execute the option +// +BOOL ExecuteCmdLineOptions( HINSTANCE hInstance, char* cmdline ) +{ + UINT message = 0; + BOOL ret = false; + char class_s[MAX_PATH]; + char title_s[MAX_LOADSTRING]; + + string cmds = ___changeCase( cmdline ); + + LoadString(hInstance, IDS_APP_CLASS, class_s, MAX_PATH); + LoadString(hInstance, IDS_APP_TITLE, title_s, MAX_LOADSTRING); + ___makelower( class_s ); + + if( FindWindow( class_s, title_s ) != NULL) + { + if( cmds.length( ) == 0 )//no commandline arguments + { + if( !ReadIntSetting( "", "TrayIcon", TRAYICON ) ) + message = WM_MY_SHOWTRAY_NOTIFICATION; + } + else + { + + if( cmds.find( "/options" ) != -1 ) + message = WM_SHOW_OPTIONS; + else if( cmds.find( "/textcolor" ) != -1 ) + message = WM_SHOW_TEXTCOLOR; + else if( cmds.find( "/about" ) != -1 ) + message = WM_SHOW_ABOUT; + else if( cmds.find( "/update" ) != -1 ) + message = WM_GET_UPDATES; + + } + + + if(message != 0) + { + PostMessage( FindWindow( class_s, title_s ), + message, + 577,// number symbols for ST7 + //recieving session will test this to see if it matches itself + (LONG)FindWindow( class_s, title_s ) + ); + + ret = true; + } + + } + + return ret; +} + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +///// Global function checks for updates +// +BOOL UpdateCheck( int major, int minor, BOOL silent ) +{ + BOOL ret = false; + const int url_size = 65535; + LPSTR url = new char[url_size]; + memset( url, 'A', ( url_size*(sizeof(char) ) ) ); + + BOOL (*lpfProc)( int,int,char * ); + + __Comment( "Loading Library: tool_x86.dll" ); + HINSTANCE hInst_tool_x86 = LoadLibraryA( "TOOL_X86.DLL" ); + if( hInst_tool_x86 != NULL ) + { + __Comment( "Load Success" ); + + // Get procedure address. + lpfProc = (BOOL(*)(int,int,char *)) + GetProcAddress( hInst_tool_x86, "Update" ); + + if( lpfProc != NULL ) + { + __Comment( "Call Update proc" ); + + if( lpfProc( major,minor, url ) ) + { + __Comment( "Update found..." ); + if( strlen( url ) ) + { + __Comment( url ); + if( __Message( IDS_UPDATE, MB_YESNO ) == IDYES ) + ShellExecute( GetMyWindowHandle( ), "open", url,0,0,SW_SHOW ); + } + + } + else + { + if(!silent) + __Message( "You have the latest version of Simply Transparent" ); + + __Comment( "no updates found" ); + } + } + + FreeLibrary( hInst_tool_x86 ); + __Comment( "Library Free Success" ); + } + else __Message( "Tool module is not present, or corrupted." ); + + delete url; + + return ret; +} + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +///// Global function that returns the instance handle of this program +// (A replacement for a global variable) +HINSTANCE GetMyInstanceHandle() +{ + return (theApp == NULL) ? NULL : theApp->GetInstanceHandle( ); +} + + +/////////////////////////////////////////////////////////////////////////////// +///// Global function that returns the main window handle of this program +// (A replacement for a global variable) +HWND GetMyWindowHandle() +{ + return (theApp == NULL) ? NULL : theApp->GetWindowHandle( ); +} + + + +/////////////////////////////////////////////////////////////////////////////// +///// Global function that returns the main title of this program +// (A replacement for a global variable) +string GetMyName() +{ + return (theApp == NULL) ? NULL : theApp->GetName( ); +} + + + +/////////////////////////////////////////////////////////////////////////////// +///// Global function that returns the Desktop ListView Control handle +// (A replacement for a global variable) +HWND GetDeskListCtlWnd( ) +{ + return (theApp == NULL) ? NULL : theApp->GetDLCWnd( ); +} + + + + +/////////////////////////////////////////////////////////////////////////////// +///// +// +BOOL _IsRes_x86Loaded( ) +{ + return ( theApp == NULL ) ? false : theApp->IsRes_Loaded( ); +} diff --git a/7/SimplyTransparent.dep b/App/Simply Transparent/SimplyTransparent.dep old mode 100644 new mode 100755 similarity index 100% rename from 7/SimplyTransparent.dep rename to App/Simply Transparent/SimplyTransparent.dep diff --git a/7/SimplyTransparent.h b/App/Simply Transparent/SimplyTransparent.h old mode 100644 new mode 100755 similarity index 100% rename from 7/SimplyTransparent.h rename to App/Simply Transparent/SimplyTransparent.h diff --git a/7/SimplyTransparent.mak b/App/Simply Transparent/SimplyTransparent.mak old mode 100644 new mode 100755 similarity index 100% rename from 7/SimplyTransparent.mak rename to App/Simply Transparent/SimplyTransparent.mak diff --git a/App/Simply Transparent/SimplyTransparent.ncb b/App/Simply Transparent/SimplyTransparent.ncb new file mode 100755 index 0000000..c50bafc Binary files /dev/null and b/App/Simply Transparent/SimplyTransparent.ncb differ diff --git a/7/SimplyTransparent.opt b/App/Simply Transparent/SimplyTransparent.opt old mode 100644 new mode 100755 similarity index 100% rename from 7/SimplyTransparent.opt rename to App/Simply Transparent/SimplyTransparent.opt diff --git a/7/SimplyTransparent.plg b/App/Simply Transparent/SimplyTransparent.plg old mode 100644 new mode 100755 similarity index 100% rename from 7/SimplyTransparent.plg rename to App/Simply Transparent/SimplyTransparent.plg diff --git a/App/Simply Transparent/SimplyTransparent.rc b/App/Simply Transparent/SimplyTransparent.rc new file mode 100755 index 0000000..6847a8e --- /dev/null +++ b/App/Simply Transparent/SimplyTransparent.rc @@ -0,0 +1,506 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_SIMPLYTRANSPARENT ICON "res\\SimplyTransparent.ico" +ID_TRAY ICON "res\\Tray.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDC_SIMPLYTRANSPARENT MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "E&xit", IDM_EXIT + END + POPUP "&Help" + BEGIN + MENUITEM "&About ...", IDM_ABOUT + END +END + +ID_TRAY MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "By Jonathan Grimes", ID_FILE_BYJONATHANGRIMES + , GRAYED + MENUITEM SEPARATOR + MENUITEM "&About Simply Transparent...", IDM_ABOUT + MENUITEM "&Help", ID_HELP + MENUITEM "Check for &Updates...", ID_UPDATE + MENUITEM SEPARATOR + MENUITEM "&Set Text Color...", ID_SET_TEXT_COLOR + MENUITEM "&Options...", ID_OPTIONS + MENUITEM SEPARATOR + MENUITEM "S&how Splash with Simply Transparent Startup", + ID_SHOWSPLASH, CHECKED + MENUITEM "Start with &Windows", ID_STARTUP, CHECKED + MENUITEM "&Beginner Mode (Asks more Questions)", ID_BEGINNERMODE + , CHECKED + MENUITEM SEPARATOR + MENUITEM "E&xit", IDM_EXIT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOGEX 0, 0, 372, 226 +STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUP | + WS_CAPTION +EXSTYLE WS_EX_APPWINDOW +CAPTION "About Simply Transparent" +FONT 8, "Tahoma", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,315,204,50,14 + CONTROL "",IDC_STATIC,"Static",SS_WHITERECT | SS_SUNKEN,7,7,98, + 193 + EDITTEXT IDC_EDIT1,117,30,245,93,ES_MULTILINE | ES_AUTOVSCROLL | + ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + ICON IDI_SIMPLYTRANSPARENT,IDC_STATIC,1,204,21,20, + SS_REALSIZEIMAGE + GROUPBOX "",IDC_STATIC,110,7,255,193 + LTEXT "By Jonathan Grimes",IDC_STATIC,26,210,64,8 + LTEXT "Simply Transparent version 7.0",IDC_STATIC,117,18,245,8 + CONTROL ID_TRAY,IDC_PAY,"Static",SS_BITMAP,321,172,41,19 + CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,138,166,190,1 + LTEXT "Static",IDC_PAYPAL_DONTATE,119,171,185,24 + LTEXT "Home page_____________",IDC_VISITME,263,147,99,9,NOT + WS_VISIBLE + CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,138,125,190,1 + LTEXT "Contact________________",IDC_CONTACTME,263,132,99,9,NOT + WS_VISIBLE,WS_EX_TRANSPARENT + LTEXT "Product Home___________",IDC_PRODUCTHOME,138,132,99,8, + NOT WS_VISIBLE + LTEXT "Help____________________",IDC_HELPME,138,147,99,8,NOT + WS_VISIBLE + CONTROL 138,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | + SS_REALSIZEIMAGE,8,8,95,191 +END + +IDD_BUTTON DIALOG 1, 1, 13, 11 +STYLE DS_SETFONT | WS_POPUP +FONT 8, "MS Sans Serif" +BEGIN +END + +IDD_HI_ADVANCED DIALOG 0, 0, 301, 159 +STYLE DS_SYSMODAL | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | + DS_CENTER | WS_POPUP | WS_CAPTION +CAPTION "Advanced" +FONT 8, "Tahoma" +BEGIN + DEFPUSHBUTTON "OK",IDOK,187,138,50,14 + PUSHBUTTON "Cancel",IDCANCEL,244,138,50,14 + CONTROL "Enable button",IDC_SHOWBUTTON,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,23,59,60,10 + CONTROL "Slider1",IDC_RESPONSIVE,"msctls_trackbar32",TBS_BOTH | + TBS_NOTICKS | WS_TABSTOP,55,97,187,15 + GROUPBOX "Advanced",IDC_STATIC,7,7,287,125 + RTEXT "More",IDC_STATIC,27,100,28,8 + GROUPBOX "Hind/Show Responsiveness",IDC_STATIC,12,84,273,40 + LTEXT "Less",IDC_STATIC,243,100,28,8 + GROUPBOX "Automatic Options",IDC_STATIC,12,41,273,39 + ICON IDI_SIMPLYTRANSPARENT,IDC_STATIC,12,18,21,20 + LTEXT "More options for hidding your icons...",IDC_STATIC,37, + 19,247,20 +END + +IDD_MESSAGE DIALOGEX 0, 0, 135, 47 +STYLE DS_ABSALIGN | DS_SYSMODAL | DS_SETFONT | DS_MODALFRAME | + DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_CAPTION +EXSTYLE WS_EX_TOOLWINDOW +FONT 8, "Tahoma", 0, 0, 0x1 +BEGIN + ICON IDI_SIMPLYTRANSPARENT,IDC_IMAGE,7,7,21,20 + PUSHBUTTON "&OK",IDOK,33,18,50,14,NOT WS_VISIBLE + PUSHBUTTON "&Yes",IDYES,35,18,50,14,NOT WS_VISIBLE + PUSHBUTTON "&No",IDNO,35,18,50,14,NOT WS_VISIBLE + PUSHBUTTON "&Cancel",IDCANCEL,35,18,50,14,NOT WS_VISIBLE +END + +IDD_METHOD DIALOGEX 0, 0, 247, 146 +STYLE DS_SYSMODAL | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | + DS_CENTER | WS_POPUP | WS_CAPTION +EXSTYLE WS_EX_APPWINDOW +CAPTION "Simply Transparent" +FONT 8, "Tahoma", 0, 0, 0x1 +BEGIN + PUSHBUTTON "Cancel",IDCANCEL,190,125,50,14 + DEFPUSHBUTTON "OK",IDOK,136,125,50,14 + CONTROL "Method 1: Brute Force",IDC_METHOD,"Button", + BS_AUTORADIOBUTTON | BS_LEFT | BS_TOP | BS_MULTILINE | + WS_DISABLED | WS_GROUP | WS_TABSTOP,24,50,207,10 + CONTROL "Method 2: Advanced",IDC_METHOD2,"Button", + BS_AUTORADIOBUTTON | BS_LEFT | BS_TOP | BS_MULTILINE | + WS_DISABLED,24,62,207,10 + GROUPBOX "Transparency Lock Method:",IDC_STATIC,7,7,233,72 + LTEXT "Simply Transparent can execute two methods that lock your options in place. Here is where you decide which one you prefer. (First one is more compatible and the second is more efficient)", + IDC_STATIC,14,18,217,26 + EDITTEXT IDC_TIMEOUT,24,96,40,12,ES_AUTOHSCROLL | ES_NUMBER | + WS_DISABLED | NOT WS_BORDER,WS_EX_STATICEDGE + GROUPBOX "User Defined Timeout interval",IDC_STATIC,7,81,233,35 + LTEXT "If you would like to check settings more or less often then change this value. (It is in milliseconds)", + IDC_STATIC,68,93,165,17 + ICON IDI_SIMPLYTRANSPARENT,IDC_STATIC,7,119,20,20 +END + +IDD_OPTIONS DIALOGEX 0, 0, 327, 242 +STYLE DS_SYSMODAL | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | + DS_CENTER | WS_POPUP | WS_CAPTION +EXSTYLE WS_EX_APPWINDOW +CAPTION "Simply Transparent Settings" +FONT 8, "Tahoma", 0, 0, 0x1 +BEGIN + PUSHBUTTON "Cancel",IDCANCEL,270,222,50,14 + PUSHBUTTON "OK",IDOK,216,222,50,14 + CONTROL "Enable icon hiding",IDC_ICON_HIDE,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,16,45,71,10, + WS_EX_TRANSPARENT + CONTROL "Automatically: Based on mouse movement", + IDC_ICON_HIDE_METHOD,"Button",BS_AUTORADIOBUTTON | + WS_DISABLED | WS_GROUP | WS_TABSTOP,18,70,153,10 + CONTROL "Manual: You hide and show the icons", + IDC_ICON_HIDE_METHOD2,"Button",BS_AUTORADIOBUTTON | + WS_DISABLED,18,83,137,10 + PUSHBUTTON "Advanced",ID_ICONHIDE_ADVANCE,261,54,50,14,WS_DISABLED + CONTROL "Enable hot tracking",IDC_HOT_TRACKING,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,16,101,74,10, + WS_EX_TRANSPARENT + CONTROL "Hover selection",IDC_TRACKMETHOD,"Button", + BS_AUTORADIOBUTTON | WS_DISABLED | WS_GROUP | WS_TABSTOP, + 18,124,66,10 + CONTROL "Hover selection + underline lables on hover", + IDC_TRACKMETHOD2,"Button",BS_AUTORADIOBUTTON | + WS_DISABLED,18,137,155,10 + CONTROL "Hover selection + always underline lables", + IDC_TRACKMETHOD3,"Button",BS_AUTORADIOBUTTON | + WS_DISABLED,18,150,152,10 + EDITTEXT IDC_HOVER_TIME,282,140,28,12,ES_AUTOHSCROLL | ES_NUMBER | + WS_DISABLED | NOT WS_BORDER,WS_EX_TRANSPARENT | + WS_EX_STATICEDGE + CONTROL "Enable Strict Active-Desktop Checking",ID_ADPOLL,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,18,183,142,10 + PUSHBUTTON "Advanced",IDC_LOCKMETHOD,265,199,51,14 + LTEXT "Icons disappear/reappear when:",-1,15,58,108,8 + LTEXT "Method of 'hot tracking':",-1,17,113,80,8 + LTEXT "The amount of time (in milliseconds) that the mouse cursor must hover over an item before it is selected:", + -1,186,111,126,28 + GROUPBOX "",-1,7,7,313,161 + GROUPBOX "",-1,11,101,305,63 + ICON IDI_SIMPLYTRANSPARENT,-1,12,16,21,20 + GROUPBOX "",-1,11,45,305,52 + LTEXT "Simply Transparent options:",-1,35,17,96,21 + GROUPBOX "Miscellaneous Options",-1,7,172,169,46 + LTEXT "By Jonathan Grimes",-1,7,228,67,8,WS_DISABLED + GROUPBOX "Transparency Lock Method",-1,179,172,141,46 + LTEXT "Currently using: X method",IDC_METHODMESSAGE,191,187, + 122,8 + CONTROL "",-1,"Static",SS_ETCHEDVERT,177,110,1,50 + CONTROL "Enable Logging",IDC_LOGGING,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,18,194,65,10 + CONTROL "Show icon in system tray",IDC_SHOWICON,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,18,205,155,10 + PUSHBUTTON "Text Color",IDC_TEXTCOLOR,261,23,50,14 +END + +IDD_SPLASH DIALOG 0, 0, 254, 296 +STYLE DS_ABSALIGN | DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_CENTER | + WS_POPUP | WS_BORDER +FONT 8, "MS Sans Serif" +BEGIN + CONTROL 131,IDC_STATIC,"Static",SS_BITMAP | SS_REALSIZEIMAGE,0,0, + 253,295 +END + +IDD_TRAYICON_AWARENESS DIALOG 0, 0, 219, 135 +STYLE DS_ABSALIGN | DS_SYSMODAL | DS_SETFONT | DS_MODALFRAME | + DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +CAPTION "Simply Transparent Tray Icon" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,77,112,64,16 + LTEXT "Static",IDC_TRAYMESSAGE,7,7,205,44 + CONTROL 140,IDC_STATIC,"Static",SS_BITMAP | SS_SUNKEN,56,55,106, + 50 +END + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +2 TEXTINCLUDE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""resource.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,21 + PRODUCTVERSION 7,1,0,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x29L +#else + FILEFLAGS 0x28L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Simply Transparent Desktop Enhancement" + VALUE "CompanyName", "JonathanGrimes" + VALUE "FileDescription", "Simply Transparent Desktop Enhancement" + VALUE "FileVersion", "1, 0, 0, 21" + VALUE "InternalName", "Simply Transparent" + VALUE "LegalCopyright", "Copyright ©2002" + VALUE "LegalTrademarks", "Simply Transparent© 2002 Jonthan Grimes GJ Logo®© Jonathan Grimes 2002" + VALUE "OriginalFilename", "SimplyTransparent.exe" + VALUE "PrivateBuild", "200" + VALUE "ProductName", "Simply Transparent" + VALUE "ProductVersion", "7, 1, 0, 0" + VALUE "SpecialBuild", "0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_BUTTON BITMAP "res\\bmp00002.bmp" +IDB_PAYPAL BITMAP "res\\donate.bmp" +IDB_SPLASH BITMAP "res\\splash-1.bmp" +IDB_ABOUT BITMAP "res\\Graphic2.bmp" +IDB_TRAY BITMAP "res\\2.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 365 + VERTGUIDE, 87 + VERTGUIDE, 110 + TOPMARGIN, 7 + BOTTOMMARGIN, 218 + HORZGUIDE, 132 + HORZGUIDE, 141 + HORZGUIDE, 147 + HORZGUIDE, 156 + HORZGUIDE, 200 + END + + IDD_BUTTON, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 6 + TOPMARGIN, 7 + BOTTOMMARGIN, 4 + END + + IDD_HI_ADVANCED, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 294 + TOPMARGIN, 7 + BOTTOMMARGIN, 152 + HORZGUIDE, 104 + END + + IDD_MESSAGE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 128 + TOPMARGIN, 7 + BOTTOMMARGIN, 40 + END + + IDD_METHOD, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 240 + VERTGUIDE, 14 + VERTGUIDE, 24 + VERTGUIDE, 231 + TOPMARGIN, 7 + BOTTOMMARGIN, 139 + END + + IDD_OPTIONS, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 320 + VERTGUIDE, 18 + VERTGUIDE, 261 + TOPMARGIN, 7 + BOTTOMMARGIN, 235 + END + + IDD_SPLASH, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 247 + TOPMARGIN, 7 + BOTTOMMARGIN, 289 + END + + IDD_TRAYICON_AWARENESS, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 212 + TOPMARGIN, 7 + BOTTOMMARGIN, 128 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUT "Thank you for using this program.\r\nThis program is freeware, but I would appreciate your support so I may continue to create utilities like this one. To contact me please click the link below.\r\n\r\nSimply Transparent © 2002 Jonathan Grimes\r\nJonathanGrimes™ 2002 Jonathan Grimes\r\nGJ Logo™ 2002 Jonathan Grimes" + IDS_STARTUPW "Turning off: Start Simply Transparent with Windows...\nAre you sure you DON'T want Simply Transparent to load at startup?" + IDS_APP_TITLE "Simply Transparent" + IDS_REGISTRY_KEY "JonathanGrimes" + IDS_NEWUSERW "Turning off: Simply Transparent Beginner Mode...\nAre you sure you DON'T want Simply Transparent to prompt you before changes?" + IDS_EXITW "Simply Transparent Closing...\nOnce Simply Transparent closes your background color and text color will be restored to the way they were colored before Simply Transparent started. Are you sure you want to close Simply Transparent?" + IDS_QUITNOW "Simply Transparent was requested to close...\nSimply Transparent is shutting down..." + IDS_APP_CLASS "SimplyTransparent.exe_JonathanG" + IDC_SIMPLYTRANSPARENT "Simply Transparent" + IDS_PAYPAL "Please support my work, so that i may continue to give away free software" + IDS_WELCOME "Welcome to Simply Transparent!\nThis is the first time you have run this program. I hope you enjoy it." +END + +STRINGTABLE +BEGIN + ID_TRAY "Simply Transparent" + IDS_ERROR_ACTIVE_DESKTOP_ENABLED + "Active Desktop Detected\nSimply Transparent detected that the Active Desktop was enabled. Simply Transparent will now close." +END + +STRINGTABLE +BEGIN + IDS_UPDATE "There is a new version SimplyTransparent availble.\nWhould you like to visit Simply Transparent's home page?" + IDS_ACTIVEDESKTOP_WARN "The Active Desktop is enabled!\nSimply Transparent can not run with Active Desktop Enabled.\nPlease disable Active Desktop's ""View As Web Page"" (or ""Show Web Content"") option before starting Simply Transparent.\n\nIf your current wallpaper is not a Windows BMP image, you can convert it. See the FAQ help file section, under the heading ""Converting my wallpaper to a Windows Bitmap (BMP)""" +END + +STRINGTABLE +BEGIN + IDC_CONTACTME "Contact me" +END + +STRINGTABLE +BEGIN + IDC_VISITME "Visit my site" +END + +STRINGTABLE +BEGIN + IDC_PRODUCTHOME "SimplyTransparent's site" + IDC_HELPME "Help" +END + +STRINGTABLE +BEGIN + IDS_TRAY_AWARNESS "Simply Transparent's interface and options are accessible via right-clicking the icon that is placed in the system tray while Simply Transparent is running.\nHere you can change the various settings that define Simply Transparent's behavior, such as Text Color." + IDS_WAITING "Simply Transparent is waiting to run\nSimply Transparent has been waiting for the previous session to close for a while now.\nDo you want Simply Transparent to continue to wait for the previous session to close?" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/7/SimplyTransparent.sln.old b/App/Simply Transparent/SimplyTransparent.sln old mode 100644 new mode 100755 similarity index 100% rename from 7/SimplyTransparent.sln.old rename to App/Simply Transparent/SimplyTransparent.sln diff --git a/App/Simply Transparent/SimplyTransparent.suo b/App/Simply Transparent/SimplyTransparent.suo new file mode 100755 index 0000000..5ee6c62 Binary files /dev/null and b/App/Simply Transparent/SimplyTransparent.suo differ diff --git a/7/SimplyTransparent.vcproj.old b/App/Simply Transparent/SimplyTransparent.vcproj old mode 100644 new mode 100755 similarity index 100% rename from 7/SimplyTransparent.vcproj.old rename to App/Simply Transparent/SimplyTransparent.vcproj diff --git a/7/StdAfx.cpp b/App/Simply Transparent/StdAfx.cpp old mode 100644 new mode 100755 similarity index 100% rename from 7/StdAfx.cpp rename to App/Simply Transparent/StdAfx.cpp diff --git a/7/StdAfx.h b/App/Simply Transparent/StdAfx.h old mode 100644 new mode 100755 similarity index 100% rename from 7/StdAfx.h rename to App/Simply Transparent/StdAfx.h diff --git a/App/Simply Transparent/TransCtrl.cpp b/App/Simply Transparent/TransCtrl.cpp new file mode 100755 index 0000000..6d3ef5e --- /dev/null +++ b/App/Simply Transparent/TransCtrl.cpp @@ -0,0 +1,998 @@ +/////////////////////////////////////////////////////////////////////////////// +//// TransCtrl.cpp : implementation file +// +// +#include "stdafx.h" +#include "SimplyTransparent.h" +#include "TransCtrl.h" +#include "_Button.h" + +#include "getwnd.h" + + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +/////////////////////////////////////////////////////////////////////////////// +//// +// +#define _STYLE_MASK LVS_EX_TRACKSELECT | LVS_EX_ONECLICKACTIVATE \ + | LVS_EX_UNDERLINEHOT | LVS_EX_UNDERLINECOLD +#define HoverEffect0 LVS_EX_TRACKSELECT +#define HoverEffectBase HoverEffect0 |LVS_EX_ONECLICKACTIVATE +#define HoverEffect1 (HoverEffectBase | LVS_EX_UNDERLINEHOT) +#define HoverEffect2 (HoverEffectBase | LVS_EX_UNDERLINECOLD) + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +static HWND * p_DeskListViewHwnd = NULL; +static HWND * p_ButtonWnd = NULL; + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +static BOOL CALLBACK EnumWindowsProc( HWND hwnd, LPARAM lParam ) +{ + + BOOL bReturn = true; + + if( IsWindowVisible( hwnd ) && hwnd != GetDesktopWindow( ) + && hwnd != *p_DeskListViewHwnd + && hwnd != *p_ButtonWnd ) + { + + RECT r; + if( GetWindowRect( hwnd, &r ) != 0 ) + { + POINT *point = ( POINT * )lParam; + if( ( point->x >= r.left )&&( point->x <= r.right ) ) + { + + if( ( point->y >= r.top )&&( point->y <= r.bottom ) ) + { + bReturn = false; + char s[MAX_PATH]; + GetWindowText( hwnd, ( char * )&s, MAX_PATH ); + if( strcmp( "Program Manager", s ) != 0 ) + point->x = point->y = -1234; + } + } + } + + } + + return bReturn; +} + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +static BOOL CheckPoint( POINT point ) +{ + EnumWindows( EnumWindowsProc, ( LPARAM )&point ); + if( ( point.x == -1234 )&&( point.y == -1234 ) ) + return false; + return true; +} + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +CTransCtrl::CTransCtrl( ) +{ + hInst_res_x86 = LoadLibraryA( "RES_X86.DLL" ); + + + m_hhook = NULL; + p_DeskListViewHwnd = &m_hDeskListViewWnd; + p_ButtonWnd = &m_hButtonWnd; + m_hButtonWnd = NULL; + + m_bHooked = false; + + m_textcolor = ReadRGBSetting( "res_x86", "textcolor", "255,255,255" ); + + __Comment( "Desktop Control Constructed" ); +} + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +CTransCtrl::~CTransCtrl( ) +{ + __Comment( "Desktop Control: Button Destroyed" ); + DestroyButton( ); + + if( m_bHooked ) + RemoveHook( ); + + if( hInst_res_x86 ) + FreeLibrary( hInst_res_x86 ); + + hInst_res_x86 = NULL; + + + __Comment( "Desktop Control Destructed" ); +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +BOOL CTransCtrl::InstallHook( ) +{ + + int nReturn = false; + + WriteIntSetting( "res_x86", "installed", 0 ); + + + DWORD (WINAPI *lpfProc)( void ); + + if( hInst_res_x86 != NULL ) + { + + // Get procedure address. + lpfProc = (DWORD(WINAPI *)(void)) + GetProcAddress( hInst_res_x86, "StartHookThreadProc" ); + + if( lpfProc != NULL ) + { + DWORD err = lpfProc( ); + if( !err ){ + nReturn = true; + m_hhook = (HHOOK)ReadIntSetting( "res_x86", "address", 0 ); + __Comment( "Hook Installed!" ); + } + else + __Error( err ); + + } + else __Comment( "function not found in resource library" ); + + } + else __Comment( "resource library not loaded" ); + + ///////////////////////////////////////////////// + + + m_bHooked = nReturn; + + return nReturn; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void CTransCtrl::RemoveHook( ) +{ + DWORD (WINAPI *lpfProc)( void ); + + if( hInst_res_x86 != NULL ) + { + + // Get procedure address. + lpfProc = (DWORD(WINAPI *)(void)) + GetProcAddress( hInst_res_x86, "StopHookThreadProc" ); + + if( lpfProc != NULL ) + { + DWORD err = lpfProc( ); + if( !err ) + { + if( ReadIntSetting( "res_x86", "address", 0 ) != 0 ) + UnhookWindowsHookEx( m_hhook ); + } + else __Error( err ); + + } + else __Comment( "function not found in resource library" ); + } + else __Comment( "resource library not loaded" ); + + ///////////////////////////////////////////////// + + + m_hhook = NULL; + m_bHooked = false; + + __Comment( "Desktop Control: Hook Removal" ); + +} + + + + + + + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +HWND CTransCtrl::GetDesktopListView( ) +{ + HWND ret = NULL; + + ret = __GetDesktopListView( ); + + return ret; +} + + + + + + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void CTransCtrl::SetTransparent( ) +{ + TestDesktop( ); + ShowWindow( m_hDeskListViewWnd, SW_HIDE ); + SendMessage( m_hDeskListViewWnd, LVM_SETTEXTBKCOLOR, 0, CLR_NONE ); + //InvalidateRect( m_hDeskListViewWnd, NULL, true ); + UpdateWindow( m_hDeskListViewWnd ); + //WaitForSingleObject( GetCurrentProcess( ), 100 ); + // Sleep( 100 ); + ShowWindow( m_hDeskListViewWnd, SW_SHOW ); +} + + + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +COLORREF CTransCtrl::GetBGColor( ) +{ + TestDesktop( ); + return ( COLORREF )SendMessage( m_hDeskListViewWnd, LVM_GETTEXTBKCOLOR, 0, 0 ); +} + + + + + + + + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void CTransCtrl::SetTextColor( ) +{ + TestDesktop( ); + + DWORD dwCustClrs [16]; + for ( int i = 0; i < 16; i++ ) + dwCustClrs [i] = _WHITE; + + m_textcolor = ReadRGBSetting( "res_x86", "textcolor", "255,255,255"); + + CHOOSECOLOR color; + ZeroMemory( &color, sizeof( CHOOSECOLOR ) ); + color.lStructSize = sizeof( CHOOSECOLOR ); + color.Flags = CC_RGBINIT|CC_ENABLEHOOK; + color.rgbResult = m_textcolor; + color.hwndOwner = GetMyWindowHandle( ); + color.lpCustColors = ( LPDWORD )dwCustClrs; + color.lCustData = 0L; + color.lpfnHook = CCHookProc; + + if( ChooseColor( &color ) ) + { + m_textcolor = color.rgbResult; + + WriteRGBSetting( "res_x86", "textcolor", m_textcolor ); + SendMessage( __GetDesktopListView( ), LVM_SETTEXTCOLOR, 57, m_textcolor ); + InvalidateRect( __GetDesktopListView( ), NULL, false ); + UpdateWindow( __GetDesktopListView( ) ); + } +} + + + + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void CTransCtrl::SetTextColorEx2( COLORREF color ) +{ + + TestDesktop( ); + + WriteRGBSetting( "res_x86", "textcolor", m_textcolor ); + + SendMessage( __GetDesktopListView( ), LVM_SETTEXTCOLOR, 57, color ); + InvalidateRect( __GetDesktopListView( ), NULL, false ); + UpdateWindow( __GetDesktopListView( ) ); +} + + + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void CTransCtrl::SetTextColorEx( COLORREF color ) +{ + TestDesktop( ); + SendMessage( __GetDesktopListView( ), LVM_SETTEXTCOLOR, 57, color ); + InvalidateRect( __GetDesktopListView( ), NULL, false ); + UpdateWindow( __GetDesktopListView( ) ); +} + + + + + + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +COLORREF CTransCtrl::GetTextColor( ) +{ + TestDesktop( ); + return ( COLORREF )SendMessage( __GetDesktopListView( ), LVM_GETTEXTCOLOR, 0, 0); +} + + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void CTransCtrl::UndoTransparent( COLORREF color ) +{ + TestDesktop( ); + + ShowWindow( m_hDeskListViewWnd, SW_HIDE ); + SendMessage( m_hDeskListViewWnd, LVM_SETTEXTBKCOLOR, 0, color ); + //InvalidateRect( m_hDeskListViewWnd, NULL, true ); + UpdateWindow( m_hDeskListViewWnd ); + //WaitForSingleObject( GetCurrentProcess(), 100 ); + //Sleep( 100 ); + HotTracking( false ); + ShowWindow( m_hDeskListViewWnd, SW_SHOW ); +} + + + + + + + + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void CTransCtrl::HotTracking( BOOL install, int hovertime ) +{ + if( TestDesktop( ) == 0 ) + { + if( install ) + { + HotTracking( false ); + switch( ReadIntSetting( "res_x86", "HoverEffect", HOVEREFFECT ) ) + { + case 1: + ListView_SetExtendedListViewStyleEx( m_hDeskListViewWnd, + _STYLE_MASK, HoverEffect0 ); + break; + + case 2: + ListView_SetExtendedListViewStyleEx( m_hDeskListViewWnd, + _STYLE_MASK, HoverEffect1 ); + break; + + case 3: + ListView_SetExtendedListViewStyleEx( m_hDeskListViewWnd, + _STYLE_MASK, HoverEffect2 ); + break; + + default: + break; + } + + if( hovertime > 0 ) + { + ListView_SetHoverTime( m_hDeskListViewWnd, hovertime ); + } + } + else + ListView_SetExtendedListViewStyleEx( m_hDeskListViewWnd, + _STYLE_MASK, 0 ); + } +} + + + + + + + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void CTransCtrl::CheckExtStyles( ) +{ + if( TestDesktop( ) == 0 ) + { + DWORD style = SendMessage( m_hDeskListViewWnd, + LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0 ); + + int time = SendMessage( m_hDeskListViewWnd, + LVM_GETHOVERTIME, 0, 0 ); + + + switch( ReadIntSetting( "res_x86", "HoverEffect", HOVEREFFECT ) ) + { + case 1: + if( ( style & HoverEffect0 ) != HoverEffect0 ) + ListView_SetExtendedListViewStyleEx( m_hDeskListViewWnd, + _STYLE_MASK, HoverEffect0 ); + break; + + case 2: + if( (style & HoverEffect1 ) != HoverEffect1 ) + ListView_SetExtendedListViewStyleEx( m_hDeskListViewWnd, + _STYLE_MASK, HoverEffect1 ); + break; + + case 3: + if( (style & HoverEffect2 ) != HoverEffect2 ) + ListView_SetExtendedListViewStyleEx( m_hDeskListViewWnd, + _STYLE_MASK, HoverEffect2 ); + break; + + default: + break; + } + + if( time != ReadIntSetting( "res_x86", "HoverTime", HOVERTIME ) ) + ListView_SetHoverTime( m_hDeskListViewWnd, + ReadIntSetting( "res_x86", "HoverTime", HOVERTIME ) ); + } +} + + + + + + + + + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +int CTransCtrl::DoHitTest( int nShowButton ) +{ + int test = TestDesktop( ); + if( test != 0 ) return test; + + POINT mouse; + + GetCursorPos( &mouse ); + if( SendMessage( m_hDeskListViewWnd, WM_NCHITTEST, 0, + MAKELPARAM( mouse.x, mouse.y) ) != HTNOWHERE ) + { + + if( CheckPoint( mouse ) ) + { + if( !IsWindowVisible( m_hDeskListViewWnd ) ) + { + if( nShowButton ) + { + ShowButton( true ); + } + else ShowWindow( m_hDeskListViewWnd, SW_SHOWNA ); + } + } + else + { + if( nShowButton ) + { + ShowButton( false ); + } + if( IsWindowVisible( m_hDeskListViewWnd ) ) + ShowWindow( m_hDeskListViewWnd, SW_HIDE ); + } + } + else{ + if( nShowButton ) + { + ShowButton( false ); + } + if( IsWindowVisible( m_hDeskListViewWnd ) ) + { + ShowWindow( m_hDeskListViewWnd, SW_HIDE ); + } + } + + return 0; +} + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void CTransCtrl::ShowIcons( ) +{ + if( TestDesktop( ) == 0 ) + { + ShowWindow( m_hDeskListViewWnd, SW_SHOWNOACTIVATE ); + } + + ShowWindow( __GetTrayWnd( ), SW_SHOWNORMAL ); + +} + + + + + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void CTransCtrl::Hide( ) +{ + if( TestDesktop( ) == 0 ) + { + if( IsWindowVisible( m_hDeskListViewWnd ) ) + ShowWindow( m_hDeskListViewWnd, SW_HIDE ); + } + + ShowWindow( __GetTrayWnd( ), SW_SHOWNORMAL ); +} + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +int CTransCtrl::DoDesktopLock( ) +{ + if( TestDesktop( ) < 0 ) + return 0; + + if( GetTextColor() != m_textcolor ) + SetTextColorEx( m_textcolor ); + + if( GetBGColor() != CLR_NONE ) + SetTransparent(); + + CheckExtStyles(); + + return 1; +} + + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +int CTransCtrl::TestDesktop( ) +{ + + HWND temp_DeskListViewHwnd = GetDesktopListView(); + + temp_DeskListViewHwnd = GetDesktopListView( ); + + + if( !temp_DeskListViewHwnd ) + { + + if( !IsWindowVisible( m_hDeskListViewWnd ) ) + ShowWindow( m_hDeskListViewWnd, SW_SHOWNA ); + + return 1; + } + + m_hDeskListViewWnd = temp_DeskListViewHwnd; + + return 0; +} + + + + + + + + + + + + + + + + + + +void CTransCtrl::CreateButton() +{ + if( m_hButtonWnd ) + return; + + DLGTEMPLATE *dt = (DLGTEMPLATE*)GlobalAlloc( GMEM_ZEROINIT|GMEM_FIXED, sizeof(DLGTEMPLATE) ); + dt->x = 1; + dt->y = 1; + dt->cx = 10; + dt->cy = 9; + dt->style = DS_ABSALIGN|WS_POPUP; + dt->dwExtendedStyle = WS_EX_TOOLWINDOW|WS_EX_TOPMOST; + dt->cdit = 0; + + __Comment( "Creating Button" ); + m_hButtonWnd = CreateDialogIndirect( GetMyInstanceHandle(), + dt, GetMyWindowHandle( ), ButtonWndProc ); + + GlobalFree( (HGLOBAL)dt ); +} + + + + + + + + + + + + + + +void CTransCtrl::DestroyButton() +{ + if( !m_hButtonWnd ) + return; + + __Comment( "Removing Button" ); + DestroyWindow( m_hButtonWnd ); + m_hButtonWnd = NULL; +} + + + + + + + + + + +void CTransCtrl::ShowButton( BOOL bShow ) +{ + if( !m_hButtonWnd ) + return; + + if( bShow ) + { + if( !__AnimateWindow( m_hButtonWnd, 200, AW_ACTIVATE|AW_BLEND ) ) + ShowWindow( m_hButtonWnd, SW_SHOWNOACTIVATE ); + else + InvalidateRect( m_hButtonWnd, 0, 1 ); + + } + else + { + ShowWindow( m_hButtonWnd, SW_HIDE ); + } +} + + diff --git a/7/TransCtrl.h b/App/Simply Transparent/TransCtrl.h old mode 100644 new mode 100755 similarity index 100% rename from 7/TransCtrl.h rename to App/Simply Transparent/TransCtrl.h diff --git a/App/Simply Transparent/_Button.cpp b/App/Simply Transparent/_Button.cpp new file mode 100755 index 0000000..1baf098 --- /dev/null +++ b/App/Simply Transparent/_Button.cpp @@ -0,0 +1,55 @@ +/////////////////////////////////////////////////////////////////////////////// +//// _Button.cpp +// + +#include "stdafx.h" +#include "simplytransparent.h" +#include "_Button.h" + + +/////////////////////////////////////////////////////////////////////////////// +///// Button Box Proc +// +BOOL CALLBACK ButtonWndProc(HWND hWnd, UINT message, + WPARAM wParam, LPARAM lParam ) +{ + PAINTSTRUCT ps; + HDC hdc,hdc2; + HBITMAP bm; + HGDIOBJ obj; + RECT rt; + + switch ( message ) + { + case WM_INITDIALOG: + InvalidateRect( hWnd, 0, true ); + return true; + + case WM_LBUTTONUP: + ShowWindow( GetDeskListCtlWnd( ), SW_SHOW ); + __AnimateWindow( hWnd, 200, AW_HIDE|AW_BLEND ); + ShowWindow( hWnd, SW_HIDE ); + return true; + + case WM_PAINT: + hdc = BeginPaint(hWnd, &ps); + GetClientRect(hWnd, &rt); + bm = LoadBitmap( GetMyInstanceHandle( ), + MAKEINTRESOURCE( IDB_BUTTON ) ); + + hdc2 = CreateCompatibleDC(hdc); + obj = SelectObject( hdc2, bm ); + + BitBlt( hdc, 0, 0, 20, 18, hdc2, 0, 0, SRCCOPY); + + //FillRect( hdc, &rt, CreateSolidBrush( 0x00ff00ff ) ); + + SelectObject( hdc2, obj ); + DeleteDC( hdc2 ); + DeleteObject( bm ); + + EndPaint(hWnd, &ps); + return true; + } + return false; +} \ No newline at end of file diff --git a/App/Simply Transparent/_Button.h b/App/Simply Transparent/_Button.h new file mode 100755 index 0000000..cf9efe9 --- /dev/null +++ b/App/Simply Transparent/_Button.h @@ -0,0 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +//// _Button.h +// + +#ifndef ___BUTTON_CTC_H__ +#define ___BUTTIN_CTC_H__ + +BOOL CALLBACK ButtonWndProc(HWND, UINT, WPARAM, LPARAM ); + +#endif //___BUTTON_CTC_H__ \ No newline at end of file diff --git a/7/_Splash.cpp b/App/Simply Transparent/_Splash.cpp old mode 100644 new mode 100755 similarity index 100% rename from 7/_Splash.cpp rename to App/Simply Transparent/_Splash.cpp diff --git a/7/_Splash.h b/App/Simply Transparent/_Splash.h old mode 100644 new mode 100755 similarity index 100% rename from 7/_Splash.h rename to App/Simply Transparent/_Splash.h diff --git a/7/getwnd.h b/App/Simply Transparent/getwnd.h old mode 100644 new mode 100755 similarity index 100% rename from 7/getwnd.h rename to App/Simply Transparent/getwnd.h diff --git a/7/main.cpp b/App/Simply Transparent/main.cpp old mode 100644 new mode 100755 similarity index 100% rename from 7/main.cpp rename to App/Simply Transparent/main.cpp diff --git a/7/main.h b/App/Simply Transparent/main.h old mode 100644 new mode 100755 similarity index 100% rename from 7/main.h rename to App/Simply Transparent/main.h diff --git a/7/res/2.bmp b/App/Simply Transparent/res/2.bmp old mode 100644 new mode 100755 similarity index 100% rename from 7/res/2.bmp rename to App/Simply Transparent/res/2.bmp diff --git a/App/Simply Transparent/res/Graphic2.bmp b/App/Simply Transparent/res/Graphic2.bmp new file mode 100755 index 0000000..8007c5b Binary files /dev/null and b/App/Simply Transparent/res/Graphic2.bmp differ diff --git a/App/Simply Transparent/res/SimplyTranparentLogo.bmp b/App/Simply Transparent/res/SimplyTranparentLogo.bmp new file mode 100755 index 0000000..5066e05 Binary files /dev/null and b/App/Simply Transparent/res/SimplyTranparentLogo.bmp differ diff --git a/7/res/SimplyTransparent.ico b/App/Simply Transparent/res/SimplyTransparent.ico old mode 100644 new mode 100755 similarity index 100% rename from 7/res/SimplyTransparent.ico rename to App/Simply Transparent/res/SimplyTransparent.ico diff --git a/7/res/Tray.ico b/App/Simply Transparent/res/Tray.ico old mode 100644 new mode 100755 similarity index 100% rename from 7/res/Tray.ico rename to App/Simply Transparent/res/Tray.ico diff --git a/7/res/arrow.ico b/App/Simply Transparent/res/arrow.ico old mode 100644 new mode 100755 similarity index 100% rename from 7/res/arrow.ico rename to App/Simply Transparent/res/arrow.ico diff --git a/7/res/bitmap1.bmp b/App/Simply Transparent/res/bitmap1.bmp old mode 100644 new mode 100755 similarity index 100% rename from 7/res/bitmap1.bmp rename to App/Simply Transparent/res/bitmap1.bmp diff --git a/7/res/bitmap2.bmp b/App/Simply Transparent/res/bitmap2.bmp old mode 100644 new mode 100755 similarity index 100% rename from 7/res/bitmap2.bmp rename to App/Simply Transparent/res/bitmap2.bmp diff --git a/7/res/bmp00002.bmp b/App/Simply Transparent/res/bmp00002.bmp old mode 100644 new mode 100755 similarity index 100% rename from 7/res/bmp00002.bmp rename to App/Simply Transparent/res/bmp00002.bmp diff --git a/7/res/donate.bmp b/App/Simply Transparent/res/donate.bmp old mode 100644 new mode 100755 similarity index 100% rename from 7/res/donate.bmp rename to App/Simply Transparent/res/donate.bmp diff --git a/App/Simply Transparent/res/splash-1.bmp b/App/Simply Transparent/res/splash-1.bmp new file mode 100755 index 0000000..65f0d42 Binary files /dev/null and b/App/Simply Transparent/res/splash-1.bmp differ diff --git a/7/res/tray.bmp b/App/Simply Transparent/res/tray.bmp old mode 100644 new mode 100755 similarity index 100% rename from 7/res/tray.bmp rename to App/Simply Transparent/res/tray.bmp diff --git a/7/res_x86/CfgFuncs.cpp b/App/Simply Transparent/res_x86/CfgFuncs.cpp old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/CfgFuncs.cpp rename to App/Simply Transparent/res_x86/CfgFuncs.cpp diff --git a/7/res_x86/CfgFuncs.h b/App/Simply Transparent/res_x86/CfgFuncs.h old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/CfgFuncs.h rename to App/Simply Transparent/res_x86/CfgFuncs.h diff --git a/7/res_x86/StdAfx.cpp b/App/Simply Transparent/res_x86/StdAfx.cpp old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/StdAfx.cpp rename to App/Simply Transparent/res_x86/StdAfx.cpp diff --git a/7/res_x86/StdAfx.h b/App/Simply Transparent/res_x86/StdAfx.h old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/StdAfx.h rename to App/Simply Transparent/res_x86/StdAfx.h diff --git a/7/res_x86/hook.h b/App/Simply Transparent/res_x86/hook.h old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/hook.h rename to App/Simply Transparent/res_x86/hook.h diff --git a/7/res_x86/res_x86.cpp b/App/Simply Transparent/res_x86/res_x86.cpp old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/res_x86.cpp rename to App/Simply Transparent/res_x86/res_x86.cpp diff --git a/App/Simply Transparent/res_x86/res_x86.def b/App/Simply Transparent/res_x86/res_x86.def new file mode 100755 index 0000000..9d6ed76 --- /dev/null +++ b/App/Simply Transparent/res_x86/res_x86.def @@ -0,0 +1,9 @@ +; res_x86.def : Declares the module parameters for the DLL. + +LIBRARY "res_x86" +SECTIONS .Res_x86App READ WRITE SHARED + +EXPORTS +DeskWndProc +StartHookThreadProc +StopHookThreadProc \ No newline at end of file diff --git a/7/res_x86/res_x86.dep b/App/Simply Transparent/res_x86/res_x86.dep old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/res_x86.dep rename to App/Simply Transparent/res_x86/res_x86.dep diff --git a/7/res_x86/res_x86.dsp b/App/Simply Transparent/res_x86/res_x86.dsp old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/res_x86.dsp rename to App/Simply Transparent/res_x86/res_x86.dsp diff --git a/7/res_x86/res_x86.h b/App/Simply Transparent/res_x86/res_x86.h old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/res_x86.h rename to App/Simply Transparent/res_x86/res_x86.h diff --git a/7/res_x86/res_x86.mak b/App/Simply Transparent/res_x86/res_x86.mak old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/res_x86.mak rename to App/Simply Transparent/res_x86/res_x86.mak diff --git a/7/res_x86/res_x86.plg b/App/Simply Transparent/res_x86/res_x86.plg old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/res_x86.plg rename to App/Simply Transparent/res_x86/res_x86.plg diff --git a/7/res_x86/res_x86.vcproj.old b/App/Simply Transparent/res_x86/res_x86.vcproj old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/res_x86.vcproj.old rename to App/Simply Transparent/res_x86/res_x86.vcproj diff --git a/7/res_x86/resource.aps b/App/Simply Transparent/res_x86/resource.aps old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/resource.aps rename to App/Simply Transparent/res_x86/resource.aps diff --git a/7/res_x86/resource.h b/App/Simply Transparent/res_x86/resource.h old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/resource.h rename to App/Simply Transparent/res_x86/resource.h diff --git a/7/res_x86/resource.rc b/App/Simply Transparent/res_x86/resource.rc old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/resource.rc rename to App/Simply Transparent/res_x86/resource.rc diff --git a/7/resource.h b/App/Simply Transparent/resource.h old mode 100644 new mode 100755 similarity index 100% rename from 7/resource.h rename to App/Simply Transparent/resource.h diff --git a/7/tool_x86/ReadMe.txt b/App/Simply Transparent/tool_x86/ReadMe.txt old mode 100644 new mode 100755 similarity index 100% rename from 7/tool_x86/ReadMe.txt rename to App/Simply Transparent/tool_x86/ReadMe.txt diff --git a/7/tool_x86/StdAfx.cpp b/App/Simply Transparent/tool_x86/StdAfx.cpp old mode 100644 new mode 100755 similarity index 100% rename from 7/tool_x86/StdAfx.cpp rename to App/Simply Transparent/tool_x86/StdAfx.cpp diff --git a/7/tool_x86/StdAfx.h b/App/Simply Transparent/tool_x86/StdAfx.h old mode 100644 new mode 100755 similarity index 100% rename from 7/tool_x86/StdAfx.h rename to App/Simply Transparent/tool_x86/StdAfx.h diff --git a/7/tool_x86/tool_x86.cpp b/App/Simply Transparent/tool_x86/tool_x86.cpp old mode 100644 new mode 100755 similarity index 100% rename from 7/tool_x86/tool_x86.cpp rename to App/Simply Transparent/tool_x86/tool_x86.cpp diff --git a/7/tool_x86/tool_x86.def b/App/Simply Transparent/tool_x86/tool_x86.def old mode 100644 new mode 100755 similarity index 100% rename from 7/tool_x86/tool_x86.def rename to App/Simply Transparent/tool_x86/tool_x86.def diff --git a/7/tool_x86/tool_x86.dep b/App/Simply Transparent/tool_x86/tool_x86.dep old mode 100644 new mode 100755 similarity index 100% rename from 7/tool_x86/tool_x86.dep rename to App/Simply Transparent/tool_x86/tool_x86.dep diff --git a/7/tool_x86/tool_x86.dsp b/App/Simply Transparent/tool_x86/tool_x86.dsp old mode 100644 new mode 100755 similarity index 100% rename from 7/tool_x86/tool_x86.dsp rename to App/Simply Transparent/tool_x86/tool_x86.dsp diff --git a/7/tool_x86/tool_x86.h b/App/Simply Transparent/tool_x86/tool_x86.h old mode 100644 new mode 100755 similarity index 100% rename from 7/tool_x86/tool_x86.h rename to App/Simply Transparent/tool_x86/tool_x86.h diff --git a/7/tool_x86/tool_x86.mak b/App/Simply Transparent/tool_x86/tool_x86.mak old mode 100644 new mode 100755 similarity index 100% rename from 7/tool_x86/tool_x86.mak rename to App/Simply Transparent/tool_x86/tool_x86.mak diff --git a/7/tool_x86/tool_x86.plg b/App/Simply Transparent/tool_x86/tool_x86.plg old mode 100644 new mode 100755 similarity index 100% rename from 7/tool_x86/tool_x86.plg rename to App/Simply Transparent/tool_x86/tool_x86.plg diff --git a/7/tool_x86/tool_x86.vcproj.old b/App/Simply Transparent/tool_x86/tool_x86.vcproj old mode 100644 new mode 100755 similarity index 100% rename from 7/tool_x86/tool_x86.vcproj.old rename to App/Simply Transparent/tool_x86/tool_x86.vcproj diff --git a/7/trayicon.cpp b/App/Simply Transparent/trayicon.cpp old mode 100644 new mode 100755 similarity index 100% rename from 7/trayicon.cpp rename to App/Simply Transparent/trayicon.cpp diff --git a/7/trayicon.h b/App/Simply Transparent/trayicon.h old mode 100644 new mode 100755 similarity index 100% rename from 7/trayicon.h rename to App/Simply Transparent/trayicon.h diff --git a/7/SimplyTransparent.aps b/App/SimplyTransparent.aps old mode 100644 new mode 100755 similarity index 100% rename from 7/SimplyTransparent.aps rename to App/SimplyTransparent.aps diff --git a/App/SimplyTransparent.clw b/App/SimplyTransparent.clw new file mode 100755 index 0000000..63ee7e7 --- /dev/null +++ b/App/SimplyTransparent.clw @@ -0,0 +1,161 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass= +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "simplytransparent.h" +LastPage=0 + +ClassCount=0 + +ResourceCount=10 +Resource1=IDD_BUTTON +Resource2=IDC_SIMPLYTRANSPARENT +Resource3=IDD_OPTIONS +Resource4=IDD_METHOD +Resource5=IDD_SPLASH +Resource6=IDD_MESSAGE +Resource7=IDD_ABOUTBOX +Resource8=ID_TRAY +Resource9=IDD_HI_ADVANCED +Resource10=IDD_TRAYICON_AWARENESS + +[DLG:IDD_BUTTON] +Type=1 +Class=? +ControlCount=0 + +[MNU:IDC_SIMPLYTRANSPARENT] +Type=1 +Class=? +Command1=IDM_EXIT +Command2=IDM_ABOUT +CommandCount=2 + +[MNU:ID_TRAY] +Type=1 +Class=? +Command1=ID_FILE_BYJONATHANGRIMES +Command2=IDM_ABOUT +Command3=ID_HELP +Command4=ID_UPDATE +Command5=ID_SET_TEXT_COLOR +Command6=ID_OPTIONS +Command7=ID_SHOWSPLASH +Command8=ID_STARTUP +Command9=ID_BEGINNERMODE +Command10=IDM_EXIT +CommandCount=10 + +[DLG:IDD_ABOUTBOX] +Type=1 +Class=? +ControlCount=16 +Control1=IDOK,button,1342242817 +Control2=IDC_STATIC,static,1342181382 +Control3=IDC_EDIT1,edit,1342179396 +Control4=IDC_STATIC,static,1342179331 +Control5=IDC_STATIC,button,1342177287 +Control6=IDC_STATIC,static,1342308352 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_PAY,static,1342177294 +Control9=IDC_STATIC,static,1342177296 +Control10=IDC_PAYPAL_DONTATE,static,1342308352 +Control11=IDC_VISITME,static,1073872896 +Control12=IDC_STATIC,static,1342177296 +Control13=IDC_CONTACTME,static,1073872896 +Control14=IDC_PRODUCTHOME,static,1073872896 +Control15=IDC_HELPME,static,1073872896 +Control16=IDC_STATIC,static,1342179854 + +[DLG:IDD_MESSAGE] +Type=1 +Class=? +ControlCount=5 +Control1=IDC_IMAGE,static,1342177283 +Control2=IDOK,button,1073807360 +Control3=IDYES,button,1073807360 +Control4=IDNO,button,1073807360 +Control5=IDCANCEL,button,1073807360 + +[DLG:IDD_METHOD] +Type=1 +Class=? +ControlCount=10 +Control1=IDCANCEL,button,1342242816 +Control2=IDOK,button,1342242817 +Control3=IDC_METHOD,button,1476601097 +Control4=IDC_METHOD2,button,1476404489 +Control5=IDC_STATIC,button,1342177287 +Control6=IDC_STATIC,static,1342308352 +Control7=IDC_TIMEOUT,edit,1476468864 +Control8=IDC_STATIC,button,1342177287 +Control9=IDC_STATIC,static,1342308352 +Control10=IDC_STATIC,static,1342177283 + +[DLG:IDD_OPTIONS] +Type=1 +Class=? +ControlCount=29 +Control1=IDCANCEL,button,1342242816 +Control2=IDOK,button,1342242816 +Control3=IDC_ICON_HIDE,button,1342242819 +Control4=IDC_ICON_HIDE_METHOD,button,1476591625 +Control5=IDC_ICON_HIDE_METHOD2,button,1476395017 +Control6=ID_ICONHIDE_ADVANCE,button,1476460544 +Control7=IDC_HOT_TRACKING,button,1342242819 +Control8=IDC_TRACKMETHOD,button,1476591625 +Control9=IDC_TRACKMETHOD2,button,1476395017 +Control10=IDC_TRACKMETHOD3,button,1476395017 +Control11=IDC_HOVER_TIME,edit,1476468864 +Control12=ID_ADPOLL,button,1342242819 +Control13=IDC_LOCKMETHOD,button,1342242816 +Control14=65535,static,1342308352 +Control15=65535,static,1342308352 +Control16=65535,static,1342308352 +Control17=65535,button,1342177287 +Control18=65535,button,1342177287 +Control19=65535,static,1342177283 +Control20=65535,button,1342177287 +Control21=65535,static,1342308352 +Control22=65535,button,1342177287 +Control23=65535,static,1476526080 +Control24=65535,button,1342177287 +Control25=IDC_METHODMESSAGE,static,1342308352 +Control26=65535,static,1342177297 +Control27=IDC_LOGGING,button,1342242819 +Control28=IDC_SHOWICON,button,1342242819 +Control29=IDC_TEXTCOLOR,button,1342242816 + +[DLG:IDD_HI_ADVANCED] +Type=1 +Class=? +ControlCount=11 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_SHOWBUTTON,button,1342242819 +Control4=IDC_RESPONSIVE,msctls_trackbar32,1342242840 +Control5=IDC_STATIC,button,1342177287 +Control6=IDC_STATIC,static,1342308354 +Control7=IDC_STATIC,button,1342177287 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_STATIC,button,1342177287 +Control10=IDC_STATIC,static,1342177283 +Control11=IDC_STATIC,static,1342308352 + +[DLG:IDD_SPLASH] +Type=1 +Class=? +ControlCount=1 +Control1=IDC_STATIC,static,1342179342 + +[DLG:IDD_TRAYICON_AWARENESS] +Type=1 +Class=? +ControlCount=3 +Control1=IDOK,button,1342242817 +Control2=IDC_TRAYMESSAGE,static,1342308352 +Control3=IDC_STATIC,static,1342181390 + diff --git a/7/SimplyTransparent.cpp b/App/SimplyTransparent.cpp old mode 100644 new mode 100755 similarity index 100% rename from 7/SimplyTransparent.cpp rename to App/SimplyTransparent.cpp diff --git a/App/SimplyTransparent.dep b/App/SimplyTransparent.dep new file mode 100755 index 0000000..109a453 --- /dev/null +++ b/App/SimplyTransparent.dep @@ -0,0 +1,81 @@ +# Microsoft Developer Studio Generated Dependency File, included by SimplyTransparent.mak + +.\_Button.cpp : \ + ".\_Button.h"\ + ".\_Splash.h"\ + ".\CfgFuncs.h"\ + ".\Options.h"\ + ".\SimplyTransparent.h"\ + ".\TransCtrl.h"\ + ".\trayicon.h"\ + + +.\_Splash.cpp : \ + ".\_Splash.h"\ + ".\CfgFuncs.h"\ + ".\Options.h"\ + ".\SimplyTransparent.h"\ + ".\TransCtrl.h"\ + ".\trayicon.h"\ + + +.\CfgFuncs.cpp : \ + ".\_Splash.h"\ + ".\CfgFuncs.h"\ + ".\Options.h"\ + ".\SimplyTransparent.h"\ + ".\TransCtrl.h"\ + ".\trayicon.h"\ + + +.\Options.cpp : \ + ".\_Splash.h"\ + ".\CfgFuncs.h"\ + ".\Options.h"\ + ".\SimplyTransparent.h"\ + ".\TransCtrl.h"\ + ".\trayicon.h"\ + + +.\SimplyTransparent.cpp : \ + ".\_Splash.h"\ + ".\CfgFuncs.h"\ + ".\Options.h"\ + ".\SimplyTransparent.h"\ + ".\TransCtrl.h"\ + ".\trayicon.h"\ + + +.\SimplyTransparent.rc : \ + ".\res\arrow.ico"\ + ".\res\bmp00002.bmp"\ + ".\res\SimplyTranparentLogo.bmp"\ + ".\res\SimplyTransparent.ico"\ + ".\res\Tray.ico"\ + + +.\StdAfx.cpp : \ + "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ + ".\_Splash.h"\ + ".\CfgFuncs.h"\ + ".\Options.h"\ + ".\SimplyTransparent.h"\ + ".\StdAfx.h"\ + ".\TransCtrl.h"\ + ".\trayicon.h"\ + + +.\TransCtrl.cpp : \ + ".\_Button.h"\ + ".\_Splash.h"\ + ".\CfgFuncs.h"\ + ".\Options.h"\ + ".\res_x86\res_x86.h"\ + ".\SimplyTransparent.h"\ + ".\TransCtrl.h"\ + ".\trayicon.h"\ + + +.\trayicon.cpp : \ + ".\trayicon.h"\ + diff --git a/App/SimplyTransparent.h b/App/SimplyTransparent.h new file mode 100755 index 0000000..149b34e --- /dev/null +++ b/App/SimplyTransparent.h @@ -0,0 +1,27 @@ + +#if !defined(AFX_SIMPLYTRANSPARENT_H__D7EAE86E_B0E6_4DE1_928D_789EC089B807__INCLUDED_) +#define AFX_SIMPLYTRANSPARENT_H__D7EAE86E_B0E6_4DE1_928D_789EC089B807__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "stdafx.h" +#include "resource.h" + + +#define MAX_LOADSTRING 100 +#define MAX_STRING 400 + + +LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM); +LRESULT CALLBACK WndProc( HWND, UINT, WPARAM, LPARAM ); +BOOL UpdateCheck( int major, int minor, BOOL silent ); +HINSTANCE GetMyInstanceHandle(); +HWND GetMyWindowHandle(); +HWND GetDeskListCtlWnd( ); +string GetMyName( ); +BOOL _IsRes_x86Loaded( ); + + +#endif // !defined(AFX_SIMPLYTRANSPARENT_H__D7EAE86E_B0E6_4DE1_928D_789EC089B807__INCLUDED_) diff --git a/App/SimplyTransparent.mak b/App/SimplyTransparent.mak new file mode 100755 index 0000000..5c3e1dc --- /dev/null +++ b/App/SimplyTransparent.mak @@ -0,0 +1,257 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on SimplyTransparent.dsp +!IF "$(CFG)" == "" +CFG=SimplyTransparent - Win32 Debug +!MESSAGE No configuration specified. Defaulting to SimplyTransparent - Win32 Debug. +!ENDIF + +!IF "$(CFG)" != "SimplyTransparent - Win32 Release" && "$(CFG)" != "SimplyTransparent - Win32 Debug" +!MESSAGE Invalid configuration "$(CFG)" specified. +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SimplyTransparent.mak" CFG="SimplyTransparent - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SimplyTransparent - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "SimplyTransparent - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SimplyTransparent - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release + +ALL : ".\Bin\SimplyTransparent.exe" + + +CLEAN : + -@erase "$(INTDIR)\_Button.obj" + -@erase "$(INTDIR)\_Splash.obj" + -@erase "$(INTDIR)\CfgFuncs.obj" + -@erase "$(INTDIR)\main.obj" + -@erase "$(INTDIR)\Options.obj" + -@erase "$(INTDIR)\SimplyTransparent.obj" + -@erase "$(INTDIR)\SimplyTransparent.pch" + -@erase "$(INTDIR)\SimplyTransparent.res" + -@erase "$(INTDIR)\StdAfx.obj" + -@erase "$(INTDIR)\TransCtrl.obj" + -@erase "$(INTDIR)\trayicon.obj" + -@erase "$(INTDIR)\vc60.idb" + -@erase ".\Bin\SimplyTransparent.exe" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP_PROJ=/nologo /G6 /ML /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\SimplyTransparent.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\SimplyTransparent.res" /d "NDEBUG" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\SimplyTransparent.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib comctl32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\SimplyTransparent.pdb" /machine:I386 /out:"Bin/SimplyTransparent.exe" +LINK32_OBJS= \ + "$(INTDIR)\_Button.obj" \ + "$(INTDIR)\_Splash.obj" \ + "$(INTDIR)\CfgFuncs.obj" \ + "$(INTDIR)\main.obj" \ + "$(INTDIR)\Options.obj" \ + "$(INTDIR)\SimplyTransparent.obj" \ + "$(INTDIR)\StdAfx.obj" \ + "$(INTDIR)\TransCtrl.obj" \ + "$(INTDIR)\trayicon.obj" \ + "$(INTDIR)\SimplyTransparent.res" + +".\Bin\SimplyTransparent.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ELSEIF "$(CFG)" == "SimplyTransparent - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +ALL : "$(OUTDIR)\SimplyTransparent.exe" + + +CLEAN : + -@erase "$(INTDIR)\_Button.obj" + -@erase "$(INTDIR)\_Splash.obj" + -@erase "$(INTDIR)\CfgFuncs.obj" + -@erase "$(INTDIR)\main.obj" + -@erase "$(INTDIR)\Options.obj" + -@erase "$(INTDIR)\SimplyTransparent.obj" + -@erase "$(INTDIR)\SimplyTransparent.pch" + -@erase "$(INTDIR)\SimplyTransparent.res" + -@erase "$(INTDIR)\StdAfx.obj" + -@erase "$(INTDIR)\TransCtrl.obj" + -@erase "$(INTDIR)\trayicon.obj" + -@erase "$(INTDIR)\vc60.idb" + -@erase "$(INTDIR)\vc60.pdb" + -@erase "$(OUTDIR)\SimplyTransparent.exe" + -@erase "$(OUTDIR)\SimplyTransparent.ilk" + -@erase "$(OUTDIR)\SimplyTransparent.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP_PROJ=/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\SimplyTransparent.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\SimplyTransparent.res" /d "_DEBUG" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\SimplyTransparent.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comctl32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\SimplyTransparent.pdb" /debug /machine:I386 /out:"$(OUTDIR)\SimplyTransparent.exe" /pdbtype:sept +LINK32_OBJS= \ + "$(INTDIR)\_Button.obj" \ + "$(INTDIR)\_Splash.obj" \ + "$(INTDIR)\CfgFuncs.obj" \ + "$(INTDIR)\main.obj" \ + "$(INTDIR)\Options.obj" \ + "$(INTDIR)\SimplyTransparent.obj" \ + "$(INTDIR)\StdAfx.obj" \ + "$(INTDIR)\TransCtrl.obj" \ + "$(INTDIR)\trayicon.obj" \ + "$(INTDIR)\SimplyTransparent.res" + +"$(OUTDIR)\SimplyTransparent.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ENDIF + +.c{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("SimplyTransparent.dep") +!INCLUDE "SimplyTransparent.dep" +!ELSE +!MESSAGE Warning: cannot find "SimplyTransparent.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "SimplyTransparent - Win32 Release" || "$(CFG)" == "SimplyTransparent - Win32 Debug" +SOURCE=.\_Button.cpp + +"$(INTDIR)\_Button.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\SimplyTransparent.pch" + + +SOURCE=.\_Splash.cpp + +"$(INTDIR)\_Splash.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\SimplyTransparent.pch" + + +SOURCE=.\CfgFuncs.cpp + +"$(INTDIR)\CfgFuncs.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\SimplyTransparent.pch" + + +SOURCE=.\main.cpp + +"$(INTDIR)\main.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\SimplyTransparent.pch" + + +SOURCE=.\Options.cpp + +"$(INTDIR)\Options.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\SimplyTransparent.pch" + + +SOURCE=.\SimplyTransparent.cpp + +"$(INTDIR)\SimplyTransparent.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\SimplyTransparent.pch" + + +SOURCE=.\SimplyTransparent.rc + +"$(INTDIR)\SimplyTransparent.res" : $(SOURCE) "$(INTDIR)" + $(RSC) $(RSC_PROJ) $(SOURCE) + + +SOURCE=.\StdAfx.cpp + +!IF "$(CFG)" == "SimplyTransparent - Win32 Release" + +CPP_SWITCHES=/nologo /G6 /ML /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\SimplyTransparent.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c + +"$(INTDIR)\StdAfx.obj" "$(INTDIR)\SimplyTransparent.pch" : $(SOURCE) "$(INTDIR)" + $(CPP) @<< + $(CPP_SWITCHES) $(SOURCE) +<< + + +!ELSEIF "$(CFG)" == "SimplyTransparent - Win32 Debug" + +CPP_SWITCHES=/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\SimplyTransparent.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c + +"$(INTDIR)\StdAfx.obj" "$(INTDIR)\SimplyTransparent.pch" : $(SOURCE) "$(INTDIR)" + $(CPP) @<< + $(CPP_SWITCHES) $(SOURCE) +<< + + +!ENDIF + +SOURCE=.\TransCtrl.cpp + +"$(INTDIR)\TransCtrl.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\SimplyTransparent.pch" + + +SOURCE=.\trayicon.cpp + +"$(INTDIR)\trayicon.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\SimplyTransparent.pch" + + + +!ENDIF + diff --git a/7/SimplyTransparent.ncb b/App/SimplyTransparent.ncb old mode 100644 new mode 100755 similarity index 100% rename from 7/SimplyTransparent.ncb rename to App/SimplyTransparent.ncb diff --git a/App/SimplyTransparent.opt b/App/SimplyTransparent.opt new file mode 100755 index 0000000..95c29cd Binary files /dev/null and b/App/SimplyTransparent.opt differ diff --git a/App/SimplyTransparent.plg b/App/SimplyTransparent.plg new file mode 100755 index 0000000..2add0f3 --- /dev/null +++ b/App/SimplyTransparent.plg @@ -0,0 +1,41 @@ + + +
+

Build Log

+

+--------------------Configuration: SimplyTransparent - Win32 Release-------------------- +

+

Command Lines

+Creating temporary file "C:\DOCUME~1\Jonathan\LOCALS~1\Temp\RSP13B.tmp" with contents +[ +/nologo /G6 /ML /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"Release/SimplyTransparent.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c +"C:\Documents and Settings\Jonathan\My Documents\My Projects\Simply Transparent 7.0\TransCtrl.cpp" +] +Creating command line "cl.exe @C:\DOCUME~1\Jonathan\LOCALS~1\Temp\RSP13B.tmp" +Creating temporary file "C:\DOCUME~1\Jonathan\LOCALS~1\Temp\RSP13C.tmp" with contents +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib comctl32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:no /pdb:"Release/SimplyTransparent.pdb" /machine:I386 /out:"Bin/SimplyTransparent.exe" +".\Release\_Button.obj" +".\Release\_Splash.obj" +".\Release\CfgFuncs.obj" +".\Release\main.obj" +".\Release\Options.obj" +".\Release\SimplyTransparent.obj" +".\Release\StdAfx.obj" +".\Release\TransCtrl.obj" +".\Release\trayicon.obj" +".\Release\SimplyTransparent.res" +] +Creating command line "link.exe @C:\DOCUME~1\Jonathan\LOCALS~1\Temp\RSP13C.tmp" +

Output Window

+Compiling... +TransCtrl.cpp +Linking... + + + +

Results

+SimplyTransparent.exe - 0 error(s), 0 warning(s) +
+ + diff --git a/7/SimplyTransparent.rc b/App/SimplyTransparent.rc old mode 100644 new mode 100755 similarity index 100% rename from 7/SimplyTransparent.rc rename to App/SimplyTransparent.rc diff --git a/7/SimplyTransparent.sln b/App/SimplyTransparent.sln old mode 100644 new mode 100755 similarity index 100% rename from 7/SimplyTransparent.sln rename to App/SimplyTransparent.sln diff --git a/App/SimplyTransparent.sln.old b/App/SimplyTransparent.sln.old new file mode 100755 index 0000000..c5664d0 --- /dev/null +++ b/App/SimplyTransparent.sln.old @@ -0,0 +1,33 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimplyTransparent", "SimplyTransparent.vcproj", "{E6B2F7B6-FC45-47D8-B2BC-A706DCB16272}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "res_x86", "res_x86\res_x86.vcproj", "{521163DC-6894-4A8A-B91E-E32B03EFD511}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tool_x86", "tool_x86\tool_x86.vcproj", "{71D1A436-820A-4A8D-919A-15DEEE099279}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {E6B2F7B6-FC45-47D8-B2BC-A706DCB16272}.Debug.ActiveCfg = Debug|Win32 + {E6B2F7B6-FC45-47D8-B2BC-A706DCB16272}.Debug.Build.0 = Debug|Win32 + {E6B2F7B6-FC45-47D8-B2BC-A706DCB16272}.Release.ActiveCfg = Release|Win32 + {E6B2F7B6-FC45-47D8-B2BC-A706DCB16272}.Release.Build.0 = Release|Win32 + {521163DC-6894-4A8A-B91E-E32B03EFD511}.Debug.ActiveCfg = Debug|Win32 + {521163DC-6894-4A8A-B91E-E32B03EFD511}.Debug.Build.0 = Debug|Win32 + {521163DC-6894-4A8A-B91E-E32B03EFD511}.Release.ActiveCfg = Release|Win32 + {521163DC-6894-4A8A-B91E-E32B03EFD511}.Release.Build.0 = Release|Win32 + {71D1A436-820A-4A8D-919A-15DEEE099279}.Debug.ActiveCfg = Debug|Win32 + {71D1A436-820A-4A8D-919A-15DEEE099279}.Debug.Build.0 = Debug|Win32 + {71D1A436-820A-4A8D-919A-15DEEE099279}.Release.ActiveCfg = Release|Win32 + {71D1A436-820A-4A8D-919A-15DEEE099279}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/7/SimplyTransparent.suo b/App/SimplyTransparent.suo old mode 100644 new mode 100755 similarity index 100% rename from 7/SimplyTransparent.suo rename to App/SimplyTransparent.suo diff --git a/7/SimplyTransparent.vcproj b/App/SimplyTransparent.vcproj old mode 100644 new mode 100755 similarity index 100% rename from 7/SimplyTransparent.vcproj rename to App/SimplyTransparent.vcproj diff --git a/App/SimplyTransparent.vcproj.old b/App/SimplyTransparent.vcproj.old new file mode 100755 index 0000000..3201afc --- /dev/null +++ b/App/SimplyTransparent.vcproj.old @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/App/StdAfx.cpp b/App/StdAfx.cpp new file mode 100755 index 0000000..cbe0450 --- /dev/null +++ b/App/StdAfx.cpp @@ -0,0 +1,1008 @@ +/////////////////////////////////////////////////////////////////////////////// +//// stdafx.cpp +// +#include "stdafx.h" +#include "simplytransparent.h" + +#include +#include + +UINT CALLBACK CustomMessageBoxProc( HWND hdlg, UINT msg, WPARAM wp, LPARAM lp ); + +#define USER_RUN_KEY "Software\\Microsoft\\Windows\\CurrentVersion\\Run"//HKEY_CURRENT_USER + +#define RECTHEIGHT( r ) (r.bottom - r.top) +#define RECTWIDTH( r ) (r.right - r.left) +#define ZERORECT( r ) memset( &r, 0, sizeof(RECT) ) + + +/////////////////////////////////////// +//// Logging definitions: +// +#define _COMMENT _CRT_WARN+_CRT_ERROR+_CRT_ASSERT+101 +#define _ERROR _COMMENT+1 +#define _LOG _ERROR+1 + +/////////////////////////////////////// +//// Loging variables +// +static HANDLE log = INVALID_HANDLE_VALUE; + +/////////////////////////////////////////////////////////////////////////////// +//// Logging Functions +// +static int AssertoinHandeler( int reportType, char *message, int *returnValue ) +{ + if( log != INVALID_HANDLE_VALUE ) + { + + DWORD written; + char mes[MAX_PATH]; + + switch( reportType ){ + case _CRT_WARN: + sprintf( mes, "WARNING: %s", message ); + break; + case _CRT_ERROR: + sprintf( mes, "ERROR: %s", message ); + break; + case _CRT_ASSERT: + sprintf( mes, "ASSERT: %s", message ); + break; + case _COMMENT: + sprintf( mes, "Comment: %s\r\n", message ); + break; + case _ERROR: + sprintf( mes, "Run-Time Error: %s\r\n", message ); + break; + case _LOG: + sprintf( mes, "%s\r\n", message ); + break; + default: + sprintf( mes, "???: %s\r\n", message ); + break; + + } + + WriteFile( log, mes, strlen( mes ), &written, 0 ); + + FlushFileBuffers( log ); + + } + + return false; +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void _InitLogger( ){ + + int n = 1; + char buf1[MAX_PATH], + buf2[MAX_PATH]; + __GetSpecialFolderPath( GetMyWindowHandle( ), buf1, CSIDL_PERSONAL ,1 ); + sprintf( buf2, "%s\\Simply Transparent Log.txt", buf1 ); + + do + { + log = CreateFile( buf2, GENERIC_WRITE, FILE_SHARE_READ, 0, + CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH, 0 ); + + if( log == INVALID_HANDLE_VALUE ) + sprintf( buf2, "%s\\Simply Transparent Log( %d ).txt", buf1, n++ ); + } + while(log == INVALID_HANDLE_VALUE); + + GetTime( buf1 ); + sprintf( buf2, "Log opened: %s", buf1 ); + AssertoinHandeler( _LOG, buf2, NULL ); + + +#ifdef _DEBUG + + __Comment( "InitLogger( ) called" ); + + _CrtSetReportHook( AssertoinHandeler ); + + + _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_WNDW ); + _CrtSetReportFile( _CRT_WARN, 0 ); + + _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_WNDW ); + _CrtSetReportFile( _CRT_ERROR, 0 ); + + _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_WNDW ); + _CrtSetReportFile( _CRT_ASSERT, 0 ); + + __Comment ( "Assertions enabled" ); +#endif //_DEBUG + +} + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +int _CheckLogger( ) { return ( log != INVALID_HANDLE_VALUE ) ? true : false; } + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void _CloseLogger() +{ + char buf1[50], + buf2[50]; + + GetTime( buf1 ); + sprintf( buf2, "log closed: %s", buf1 ); + AssertoinHandeler( _LOG, buf2, NULL ); + + FlushFileBuffers( log ); + CloseHandle( log ); + + log = INVALID_HANDLE_VALUE; +} + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void __Comment ( const char *message ) +{ + AssertoinHandeler( _COMMENT, (char *)message, NULL ); +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +int __Message ( const char *message, int type ) +{ + __Comment( message ); + char s[2048]; + + sprintf( s, "%d%s", type, message ); + + return DialogBoxParam( GetMyInstanceHandle( ), (LPCTSTR)IDD_MESSAGE, GetMyWindowHandle(), + (DLGPROC)CustomMessageBoxProc, (LPARAM)s ); + +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +int __Message ( UINT message, int type ) +{ + const DWORD buffer_size = 65535; + LPSTR buffer = new char[buffer_size]; + memset( buffer, 0, (buffer_size*sizeof(char)) ); + + LoadString( GetMyInstanceHandle( ), message, buffer, buffer_size); + int ret = __Message( buffer, type ); + + delete buffer; + return ret; +} + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void __Error( const char *message ) +{ + AssertoinHandeler( _ERROR, (char *)message, NULL ); + //__Message( message ); +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void __Error( DWORD error ) +{ + LPVOID lpMsgBuf; + + FormatMessage( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + error, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language + (LPTSTR) &lpMsgBuf, + 0, + NULL + ); + + AssertoinHandeler( _ERROR, (char*)(LPCTSTR)lpMsgBuf, NULL ); + + LocalFree( lpMsgBuf ); +} + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void __ErrorMessage( const char *message ) +{ + AssertoinHandeler( _ERROR, (char *)message, NULL ); + __Message( message ); +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void __ErrorMessage( DWORD error ) +{ + LPVOID lpMsgBuf; + + FormatMessage( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + error, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language + (LPTSTR) &lpMsgBuf, + 0, + NULL + ); + + __Message( (char *)(LPCTSTR)lpMsgBuf ); + AssertoinHandeler( _ERROR, (char*)(LPCTSTR)lpMsgBuf, NULL ); + + LocalFree( lpMsgBuf ); +} + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +char * GetTime( char *ret ) +{ + SYSTEMTIME time; + + GetLocalTime( &time ); + + char *mo[] = { "January", "February", "March", "April", "May", "June", + "July", "August", "September", "October", "November", "December" }; + + sprintf( ret, "%d:%d:%d %s ( %s %d, %d )", + (time.wHour>12)?time.wHour-12:time.wHour, + time.wMinute, + time.wSecond, + (time.wHour >= (WORD)12) ? "PM" : "AM", + mo[time.wMonth-1], + time.wDay, + time.wYear + ); + return ret; +} + + + + +/////////////////////////////////////////////////////////////////////////////// +//// For now I don't want to use the registry run key... +// +BOOL __DoesStartWithWindows( LPCTSTR exe, LPCTSTR name, + HWND hWnd, BOOL bUseRegistry ) +{ + BOOL bReturn = TRUE; + HKEY key; + + + if( bUseRegistry ) + { + + if( ERROR_SUCCESS == RegOpenKeyEx( HKEY_CURRENT_USER, + TEXT( USER_RUN_KEY ),0, + KEY_ALL_ACCESS, &key ) ) + { + /* + char value[MAX_PATH]; + LONG value_size = MAX_PATH; + + if(RegQueryValueEx(key,TEXT(name),0, LPDWORD lpType, + REG_SZ, value, value_size ) != ERROR_SUCCESS) + { + bReturn = FALSE; + } */ + + RegCloseKey( key ); + } + else bReturn = FALSE; + } + else + { + char filename[MAX_PATH*2]; + char path[MAX_PATH]; + __GetSpecialFolderPath( hWnd, path, CSIDL_STARTUP, 1 ); + + sprintf( filename, "%s\\%s.lnk", path, name ); + + //////////////////////////////////////////////////////// + //// See if the file defined in szPath exists + // + FILE *Shortcut; + if( ( Shortcut = fopen( filename, "r" ) ) == NULL ) + bReturn = FALSE; + + else fclose( Shortcut ); + //////////////////////////////////////////////////////// + + } + + return bReturn; +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +BOOL __StartWithWindows( BOOL bStart, LPCTSTR exe, + LPCTSTR name, HWND hWnd, BOOL bUseRegistry ) +{ + BOOL bReturn = TRUE; + HKEY key; + char filename[MAX_PATH*2]; + string exe_s = exe; + + { + char path[MAX_PATH]; + + __GetSpecialFolderPath( hWnd, path, CSIDL_STARTUP ,1 ); + + sprintf( filename, "%s\\%s.lnk", path, name ); + } + + if( bStart ) + { + if( bUseRegistry ) + { + if( ERROR_SUCCESS == RegOpenKeyEx( HKEY_CURRENT_USER, + TEXT( USER_RUN_KEY ), 0, KEY_ALL_ACCESS, &key ) ) + { + RegSetValueEx( key, TEXT( name ), 0, REG_SZ, + (BYTE*)(unsigned char *)LPCSTR( exe ), 512 ); + + RegCloseKey( key ); + } + } + else + { + + string folder = ___left( exe_s, ___reversefind( exe_s, '\\' ) ); + __CreateLink( + exe, + folder.c_str( ), + "", + (char *)LPCTSTR( filename ), + (char *)LPCTSTR( name ) + + ); + } + } + else + { + DeleteFile( filename ); + + if( ERROR_SUCCESS == RegOpenKeyEx( HKEY_CURRENT_USER, + TEXT( USER_RUN_KEY ),0, KEY_ALL_ACCESS, &key ) ) + { + RegDeleteValue( key, TEXT( name ) ); + RegCloseKey( key ); + } + } + + return bReturn; +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +HRESULT __CreateLink( LPCSTR pszShortcutFile, LPCSTR pszWorkDir, + LPCSTR pszCmdArgs, LPSTR pszLink, LPSTR pszDesc ) +{ + HRESULT hres; + IShellLink *psl; + + CoInitialize( NULL ); + + // Create an IShellLink object and get a pointer to the IShellLink + // interface (returned from CoCreateInstance). + hres = CoCreateInstance ( CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, + IID_IShellLink, (void **)&psl ); + + if( hres > -1 ) + { + + IPersistFile *ppf; + + // Query IShellLink for the IPersistFile interface for + // saving the shortcut in persistent storage. + hres = psl->QueryInterface( IID_IPersistFile, (void **)&ppf ); + if( hres > -1 ) + { + + WORD wsz [MAX_PATH]; // buffer for Unicode string + + // Set the path to the shortcut target. + hres = psl->SetPath( pszShortcutFile ); + hres = psl->SetWorkingDirectory( pszWorkDir ); + hres = psl->SetArguments( pszCmdArgs ); + + //hres = psl->SetIconLocation( "", 0 ); + + // Set the description of the shortcut. + hres = psl->SetDescription( pszDesc ); + if( hres != NOERROR ) + __Error( "__CreateLink( ): SetDescription( ) failed!" ); + + // Ensure that the string consists of ANSI characters. + MultiByteToWideChar( CP_ACP, 0, pszLink, -1, wsz, MAX_PATH ); + // Save the shortcut via the IPersistFile::Save member function. + hres = ppf->Save ( wsz, TRUE ); + if( hres == E_FAIL ) + { + __Error( "__CreateLink( ): Save failed!" ); + } + + // Release the pointer to IPersistFile. + ppf->Release( ); + } + else + __Error( "__CreateLink( ): QueryInterface( ) failed!" ); + + // Release the pointer to IShellLink. + psl->Release( ); + } + else + __Error( "__CreateLink( ): CoCreateInstance( ) failed!" ); + + + CoUninitialize( ); + + return hres; +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +HRESULT __GetSpecialFolderPath( HWND hwndOwner, LPTSTR lpszPath, + int nFolder, BOOL fCreate ) +{ + HRESULT hReturn = !NOERROR; + + LPITEMIDLIST pidl; + LPMALLOC pmalloc = NULL; + + SHGetMalloc( &pmalloc ); + + hReturn = SHGetSpecialFolderLocation( hwndOwner, nFolder, &pidl ); + + if( pidl ) + { + SHGetPathFromIDList( pidl, lpszPath ); + + pmalloc->Free( pidl ); + } + else hReturn = !NOERROR; + + pmalloc->Release( ); + + return hReturn; +} + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +BOOL __AnimateWindow( HWND hwnd, DWORD dwTime, DWORD dwFlags ) +{ + if(!IsWindowsNT( ))return false; + + BOOL bReturn = false; + + BOOL ( WINAPI *lpfAnimateWindow )( HWND, DWORD, DWORD ); + + HINSTANCE hInstLib = LoadLibraryA( "USER32.DLL" ); + if( hInstLib != NULL ) + { + // Get procedure address. + lpfAnimateWindow = ( BOOL(WINAPI *)(HWND,DWORD,DWORD) ) + GetProcAddress( hInstLib, "AnimateWindow" ); + + if( lpfAnimateWindow != NULL ) + { + bReturn = lpfAnimateWindow( hwnd, dwTime, dwFlags ); + } + else + { + //function not found + } + } + + FreeLibrary( hInstLib ) ; + + return bReturn; +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +BOOL __ADenabled( BOOL bWarn ) +{ + + BOOL ret = false; + HINSTANCE h_Shell32 = LoadLibrary( "shell32.dll" ); + if( h_Shell32 ) + { + void ( WINAPI *pfn_SHGetSettings ) + ( LPSHELLFLAGSTATE, DWORD );//function declaration + + pfn_SHGetSettings = + (void(WINAPI *)(LPSHELLFLAGSTATE,DWORD)) + GetProcAddress( h_Shell32, "SHGetSettings" ); + + if( pfn_SHGetSettings ) + { + SHELLFLAGSTATE shellstateOptions; + pfn_SHGetSettings( &shellstateOptions, SSF_DESKTOPHTML ); + if( shellstateOptions.fDesktopHTML != 0 ) + { + + if( bWarn ) + { + __Message( IDS_ACTIVEDESKTOP_WARN ); + } + + ret = true; + + + }// end if: is Active desktop enabled? + + }// end if: function pointer null? + + }// end if: h_Shell32 valid? + + FreeLibrary(h_Shell32); + + return ret; +} + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// Color Dialog Hook proc... used for centering... +// +UINT CALLBACK CCHookProc( HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam) +{ + if( uiMsg == WM_INITDIALOG ){ + + RECT dlg; + RECT center; + POINT p; + GetWindowRect( hdlg, &dlg ); + ScreenToClient( GetParent( hdlg ), &dlg ); + GetWindowRect( GetParent( hdlg ), ¢er );//GetDesktopWindow( ) + ScreenToClient( GetParent( hdlg ), ¢er ); + + p.x = ( center.left + center.right ) / 2 + - ( dlg.left + dlg.right ) / 2; + p.y = ( center.top + center.bottom ) / 2 + - (dlg.top + dlg.bottom ) / 2; + + ClientToScreen( GetParent( hdlg ), &p ); + + SetWindowPos( hdlg, NULL, p.x, p.y, -1, -1, + SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE ); + + SetWindowText( hdlg, "Set Text Color" ); + + __AnimateWindow( hdlg, 200, AW_ACTIVATE|AW_BLEND ); + ShowWindow( hdlg, SW_SHOW ); + InvalidateRect( hdlg, 0, true ); + } + + return 0; +} + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// Custom message box proc... +// +UINT CALLBACK CustomMessageBoxProc( HWND hdlg, UINT msg, WPARAM wp, LPARAM lp ) +{ + static string sHead; + static string sText; + + RECT rWindow = {0,0,0,0}, + rIcon = {0,0,0,0}, + rMessage = {0,0,0,0}, + rHeading = {0,0,0,0}, + rDesktop = {0,0,0,0}, + rTemp = {0,0,0,0}; + + char *t; + int nButtonType, + width = 0, + width_head = 0, + width_mess = 0, + height = 0, + height_head = 0, + height_mess = 0, + caption; + + PAINTSTRUCT ps; + HDC hdc; + HFONT font; + HGDIOBJ hObj; + + switch( msg ) + { + + case WM_COMMAND: + if (LOWORD(wp) == IDOK || LOWORD(wp) == IDCANCEL + || LOWORD(wp) == IDYES || LOWORD(wp) == IDNO) + { + sHead.erase(); + sText.erase(); + __AnimateWindow( hdlg, 200, AW_HIDE|AW_BLEND ); + EndDialog(hdlg, LOWORD(wp)); + return TRUE; + } + break; + + case WM_PAINT: + hdc = BeginPaint(hdlg, &ps); + + font = CreateFont( + -MulDiv( 8, GetDeviceCaps(hdc, LOGPIXELSY), 72), + 0, + 0, + 0, + 400, + false, //italic + false, //underline + false, //strickout + DEFAULT_CHARSET, + OUT_DEFAULT_PRECIS, + CLIP_DEFAULT_PRECIS, + DEFAULT_QUALITY, //PROOF_QUALITY + DEFAULT_PITCH|FF_SWISS, + "Tahoma" );//"MS Sans Serif" + + GetClientRect( hdlg, &rWindow ); + GetWindowRect( GetDlgItem( hdlg, IDC_IMAGE ), &rIcon ); + ScreenToClient( hdlg, &rIcon ); + + rMessage = rWindow; + rMessage.top = rWindow.top+rIcon.top; + rMessage.left = rWindow.left+rIcon.right+10; + rMessage.right -= rIcon.left; + + SetTextColor( hdc, RGB(0,0,0) ); + SetBkMode( hdc, TRANSPARENT ); + + if( sHead.length() != 0 ) + { + rHeading.top = rWindow.top+5;//rIcon.top; + rHeading.right = rWindow.right; + rHeading.left = rWindow.left+rIcon.right; + rHeading.bottom = rWindow.bottom; + + height = DrawText( hdc, sHead.c_str(), sHead.length(), &rHeading, DT_SINGLELINE|DT_CALCRECT ); + DrawText( hdc, sHead.c_str(), sHead.length(), &rHeading, DT_SINGLELINE ); + + rMessage.top = rHeading.bottom; + } + + //rMessage.left += 10; + + if( sText.length() != 0 ) + { + hObj = SelectObject( hdc, font ); + DrawText( hdc, sText.c_str(), sText.length(), &rMessage, DT_WORDBREAK ); + SelectObject( hdc, hObj ); + } + + DeleteObject( font ); + + EndPaint(hdlg, &ps); + break; + + + + + + + + case WM_INITDIALOG: + __Comment( "init message" ); + +/////////////////////////////////////////////////////////////////////////////// +///// Parse message string + + t = (char *)lp; + + nButtonType = t[0]-'0'; + + t++; + + if( ___find( t, "\n", 0 ) != -1 ) + { + sHead = ___left( t, ___find( t, "\n", 0 ) ); + sText = ___mid( t, ___find( t, "\n", 0 )+1 ); + } + else sText = t; + +/////////////////////////////////////////////////////////////////////////////// + hdc = GetDC( hdlg ); + + font = CreateFont( + -MulDiv( 8, GetDeviceCaps(hdc, LOGPIXELSY), 72), + 0, + 0, + 0, + 400, + false, //italic + false, //underline + false, //strickout + DEFAULT_CHARSET, + OUT_DEFAULT_PRECIS, + CLIP_DEFAULT_PRECIS, + DEFAULT_QUALITY, //PROOF_QUALITY + DEFAULT_PITCH|FF_SWISS, + "Tahoma" );//"MS Sans Serif" + +/////////////////////////////////////////////////////////////////////////////// + + GetWindowRect( GetDesktopWindow(), &rDesktop ); + GetWindowRect( hdlg, &rWindow ); + GetClientRect( hdlg, &rTemp ); + ClientToScreen( hdlg, &rTemp ); + + caption = rTemp.top - rWindow.top; + + GetWindowRect( GetDlgItem( hdlg, IDC_IMAGE ), &rIcon ); + ScreenToClient( hdlg, &rIcon ); + + rMessage = rWindow; + rMessage.top = rWindow.top+rIcon.top; + rMessage.left = rWindow.left+rIcon.right+10; + + if( sHead.length() != 0 ) + { + rHeading.top = rWindow.top+rIcon.top; + rHeading.right = rWindow.right; + rHeading.left = rWindow.left+rIcon.right; + rHeading.bottom = rWindow.bottom; + + height = DrawText( hdc, sHead.c_str(), sHead.length(), &rHeading, DT_SINGLELINE|DT_CALCRECT); + + rHeading.bottom = rHeading.top + height; + rMessage.top += rHeading.bottom; + } + + hObj = SelectObject( hdc, font ); + + height = DrawText( hdc, sText.c_str(), sText.length(), &rMessage, DT_CALCRECT|DT_SINGLELINE); + + SelectObject( hdc, hObj ); + DeleteObject( font ); + + if( ((RECTWIDTH(rDesktop)/10)*6) < RECTWIDTH(rMessage) ) + { + int desiredWidth = ((RECTWIDTH(rDesktop)/10)*6); + int lines = RECTHEIGHT(rMessage)/height; + lines += RECTWIDTH(rMessage)/desiredWidth; + lines++; + + rMessage.right = rMessage.left+desiredWidth; + rMessage.bottom = rMessage.top + (lines*height); + + } + + /////////////////// + width_head = rHeading.right - rHeading.left; + width_mess = rMessage.right - rMessage.left+10; + + height_head = rHeading.bottom - rHeading.top; + height_mess = rMessage.bottom - rMessage.top; + + // v--includes gutter + // __border__|icon_________|______text width_________________________________________|__border__ + width = rIcon.left+rIcon.right + ( ( width_head > width_mess ) ? width_head : width_mess )+rIcon.left; + + if( width < 200 )width = 200; + + + // caption__|top gutter_|____body height__________|_btn__|_gutter__ + height = caption + rIcon.top + height_head + height_mess + 35 + rIcon.top; + + if( height < 75 )height = 75; + + + rWindow.left = (rDesktop.right/2) - (width/2); + rWindow.right = (rDesktop.right/2) + (width/2); + rWindow.top = (rDesktop.bottom/2) - (height/2); + rWindow.bottom = (rDesktop.bottom/2) + (height/2); + + MoveWindow( hdlg, rWindow.left, rWindow.top, RECTWIDTH( rWindow ), RECTHEIGHT( rWindow ), true ); + + ScreenToClient( hdlg, &rWindow ); + + if( nButtonType > -1) + { + RECT r; + switch( nButtonType ) + { + case MB_OK: + + r.top = rWindow.bottom-rIcon.top-25; + r.bottom = rWindow.bottom-rIcon.top; + + r.left = ( RECTWIDTH( rWindow )/2)-50; + r.right = ( RECTWIDTH( rWindow )/2)+50; + + MoveWindow( GetDlgItem( hdlg, IDOK ), + r.left, r.top, RECTWIDTH( r ), RECTHEIGHT( r ), true ); + + SetWindowLong( GetDlgItem( hdlg, IDOK ), GWL_STYLE, + BS_PUSHBUTTON|WS_CHILD|WS_VISIBLE|WS_TABSTOP ); + break; + + case MB_YESNO: + + r.top = rWindow.bottom-rIcon.top-25; + r.bottom = rWindow.bottom-rIcon.top; + + r.left = ( RECTWIDTH( rWindow )/2)-105; + r.right = ( RECTWIDTH( rWindow )/2)-5; + + MoveWindow( GetDlgItem( hdlg, IDYES ), + r.left, r.top, RECTWIDTH( r ), RECTHEIGHT( r ), true ); + + SetWindowLong( GetDlgItem( hdlg, IDYES ), GWL_STYLE, + BS_PUSHBUTTON|WS_CHILD|WS_VISIBLE|WS_TABSTOP ); + + r.left = ( RECTWIDTH( rWindow )/2 )+5; + r.right = ( RECTWIDTH( rWindow )/2 )+105; + + MoveWindow( GetDlgItem( hdlg, IDNO ), + r.left, r.top, RECTWIDTH( r ), RECTHEIGHT( r ), true ); + SetWindowLong( GetDlgItem( hdlg, IDNO ), GWL_STYLE, + BS_PUSHBUTTON|WS_CHILD|WS_VISIBLE|WS_TABSTOP); + break; + case MB_YESNOCANCEL: + + r.top = rWindow.bottom-rIcon.top-25; + r.bottom = rWindow.bottom-rIcon.top; + + r.left = ( RECTWIDTH( rWindow )/2)-160; + r.right = ( RECTWIDTH( rWindow )/2)-60; + + MoveWindow( GetDlgItem( hdlg, IDYES ), + r.left, r.top, RECTWIDTH( r ), RECTHEIGHT( r ), true ); + + SetWindowLong( GetDlgItem( hdlg, IDYES ), GWL_STYLE, + BS_PUSHBUTTON|WS_CHILD|WS_VISIBLE|WS_TABSTOP ); + + r.left = ( RECTWIDTH( rWindow )/2 )-50; + r.right = ( RECTWIDTH( rWindow )/2 )+50; + + MoveWindow( GetDlgItem( hdlg, IDNO ), + r.left, r.top, RECTWIDTH( r ), RECTHEIGHT( r ), true ); + SetWindowLong( GetDlgItem( hdlg, IDNO ), GWL_STYLE, + BS_PUSHBUTTON|WS_CHILD|WS_VISIBLE|WS_TABSTOP); + + + r.left = ( RECTWIDTH( rWindow )/2 )+60; + r.right = ( RECTWIDTH( rWindow )/2 )+160; + + MoveWindow( GetDlgItem( hdlg, IDCANCEL ), + r.left, r.top, RECTWIDTH( r ), RECTHEIGHT( r ), true ); + SetWindowLong( GetDlgItem( hdlg, IDCANCEL ), GWL_STYLE, + BS_PUSHBUTTON|WS_CHILD|WS_VISIBLE|WS_TABSTOP); + + + break; + } + } + + + { + char name[30]; + LoadString( GetMyInstanceHandle(), IDS_APP_TITLE, name, 30 ); + SetWindowText( hdlg, name ); + } + + + UpdateWindow( hdlg ); + + __AnimateWindow( hdlg, 200, AW_ACTIVATE|AW_BLEND ); + __Comment( "show message" ); + ShowWindow( hdlg, SW_SHOW ); + InvalidateRect( hdlg, 0, true ); + + break; + } + + return 0; + +} \ No newline at end of file diff --git a/App/StdAfx.h b/App/StdAfx.h new file mode 100755 index 0000000..0f47ee4 --- /dev/null +++ b/App/StdAfx.h @@ -0,0 +1,338 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_) +#define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + + +// Windows Header Files: +#include +#include +#include + + + +// C RunTime Header Files +#include +#include +#include + +#include +#include + +#include +using namespace std; + +#include "CfgFuncs.h" +#include "options.h" + +#ifdef MAX_PATH +#undef MAX_PATH +#define MAX_PATH 950//1560 +#endif + +#define WM_MY_TRAY_NOTIFICATION WM_USER+101 +#define WM_MY_BEGIN_EXIT_NOTIFICATION WM_USER+102 +#define WM_MY_EXIT_NOTIFICATION WM_USER+103 +#define WM_SIMPLYTRANSPARENT_SETTEXTCOLOR WM_USER+106 +#define WM_MY_RESTART_NOTIFICATION WM_USER+110 +#define WM_MY_SHOWTRAY_NOTIFICATION WM_USER+111 +#define WM_SHOW_OPTIONS WM_APP+1 +#define WM_SHOW_TEXTCOLOR WM_APP+2 +#define WM_GET_UPDATES WM_APP+3 +#define WM_SHOW_ABOUT WM_APP+4 + +#ifndef AW_HOR_POSITIVE +#define AW_HOR_POSITIVE 0x00000001 +#define AW_HOR_NEGATIVE 0x00000002 +#define AW_VER_POSITIVE 0x00000004 +#define AW_VER_NEGATIVE 0x00000008 +#define AW_CENTER 0x00000010 +#define AW_HIDE 0x00010000 +#define AW_ACTIVATE 0x00020000 +#define AW_SLIDE 0x00040000 +#define AW_BLEND 0x00080000 +#endif //AW_HOR_POSITIVE + +#define _WHITE RGB( 255, 255, 255 ) +#define _BLACK RGB( 0, 0, 0 ) + +#ifdef _DEBUG////////////////////////////////////////////////////////////////// +#include +#define ASSERT(b) _ASSERTE(b) +#else////////////////////////////////////////////////////////////////////////// +#define ASSERT(b) ( b ) +#define _CRT_WARN 1 +#define _CRT_ERROR 2 +#define _CRT_ASSERT 3 +#endif///////////////////////////////////////////////////////////////////////// + +void _InitLogger( ); +int _CheckLogger( ); +void _CloseLogger( ); +void __Comment ( const char * ); +int __Message ( const char *message, int type = MB_OK ); +int __Message ( UINT message, int type = MB_OK ); +void __Error( const char * ); +void __Error( DWORD error ); +void __ErrorMessage( const char *message ); +void __ErrorMessage( DWORD error ); + + +/////////////////////////////////////////////////////////////////////////////// +//// Global Function Declarations +// +char * GetTime( char * ); + +BOOL __DoesStartWithWindows( LPCTSTR sExe, LPCTSTR sName, + HWND hWnd = NULL, BOOL bRegistryStartup = false ); + +BOOL __StartWithWindows( BOOL bStart, LPCTSTR exe, LPCTSTR name, + HWND hWnd = NULL, BOOL bUseRegistry = false ); + +HRESULT __CreateLink( LPCSTR, LPCSTR, LPCSTR, LPSTR, LPSTR ); + +HRESULT __GetSpecialFolderPath( HWND, LPTSTR, int, BOOL ); + +BOOL __AnimateWindow( HWND, DWORD, DWORD ); + +BOOL __ADenabled( BOOL ); + +/////////////////////////////////////////////////////////////////////////////// +//// Color Dialog Hook proc... used for centering... +// +UINT CALLBACK CCHookProc( HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam); + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// Tool Functions +// + +inline BOOL IsWindowsNT( ) +{ + BOOL ret = false; + OSVERSIONINFO osver; + osver.dwOSVersionInfoSize = sizeof( osver ); + if( GetVersionEx( &osver ) ) + ret = ( osver.dwPlatformId == VER_PLATFORM_WIN32_NT ); + + return ret; +} + + + + + + + + + + +inline BOOL ScreenToClient( HWND hWnd, LPRECT lpRect ) +{ + BOOL ret; + POINT t; + + int width = lpRect->right - lpRect->left; + int height = lpRect->bottom - lpRect->top; + + t.x = lpRect->left; + t.y = lpRect->top; + + ret = ScreenToClient( hWnd, &t ); + if(ret != 0 ) + { + lpRect->left = t.x; + lpRect->top = t.y; + + lpRect->right = t.x+width; + lpRect->bottom = t.y+height; + } + + return ret; +} + + + + + + + + + + +inline BOOL ClientToScreen( HWND hWnd, LPRECT lpRect ) +{ + BOOL ret; + POINT t; + + int width = lpRect->right - lpRect->left; + int height = lpRect->bottom - lpRect->top; + + t.x = lpRect->left; + t.y = lpRect->top; + + ret = ClientToScreen( hWnd, &t ); + if(ret != 0 ) + { + lpRect->left = t.x; + lpRect->top = t.y; + + lpRect->right = t.x+width; + lpRect->bottom = t.y+height; + } + + return ret; +} + + + + + + +inline BOOL IsPintInRect( LPPOINT lpPoint, LPRECT lpRect ) +{ + BOOL ret = false; + + + if( ( lpPoint->x >= lpRect->left && lpPoint->x <= lpRect->right ) + && ( lpPoint->y >= lpRect->top && lpPoint->y <= lpRect->bottom ) ) + ret = true; + + return ret; +} + + + + + + + +inline int ___find( string str, const char *c, int start ) +{ + int length = str.length( ); + if ( start > length) + return -1; + + char *res = strstr( str.c_str( ) + start, c); + + + return ( res == NULL ) ? -1 : (int)( res - str.c_str( ) ); +} + +inline int ___reversefind( string str, const char c ) +{ + char *res = strrchr( str.c_str( ), c ); + + return (res == NULL) ? -1 : (int)(res - str.c_str( ) ); +} + +inline string ___mid( string str, int first, int count = -1 ) +{ + if (first < 0) first = 0; + + if ( unsigned( first + count ) > str.length( ) || (count < 0) ) + count = str.length( ) - first; + + if ( unsigned( first ) > str.length( ) ) + count = 0; + + ASSERT( first >= 0 ); + ASSERT( unsigned( first + count ) <= str.length( ) ); + + int size = count; + + char *dest = new char[size+1]; + memset( dest, '\0', size+1 ); + memcpy(dest, str.c_str( )+first, size ); + + string temp; + temp = dest; + delete dest; + + return temp; +} + +inline string ___right( string str, int start ) +{ + if ( start < 0 ) start = 0; + if ( unsigned(start) >= str.length( ) ) + start = str.length( ); + + int size = str.length( ) - start; + + char *dest = new char[size+1]; + memset( dest, '\0', size+1 ); + memcpy( dest, str.c_str( )+start, size ); + + string temp; + temp = dest; + delete dest; + + return temp; +} + +inline string ___left( string str, int end ) +{ + if ( end < 0 ) end = 0; + if ( unsigned(end) >= str.length( ) ) + end = str.length( ); + + char *dest = new char[end+1]; + memset( dest, '\0', end+1 ); + memcpy( dest, str.c_str( ), end ); + + string temp; + temp = dest; + delete dest; + + return temp; +} + +inline void ___makelower( char *str ) +{ + for( unsigned int x = 0; x= 65 )?(str[x]+32):str[x]; + else + out[x] = (str[x] <= 122 && str[x] >= 97 )?(str[x]-32):str[x]; + } + + return out; +} + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_) diff --git a/7/TransCtrl.cpp b/App/TransCtrl.cpp old mode 100644 new mode 100755 similarity index 100% rename from 7/TransCtrl.cpp rename to App/TransCtrl.cpp diff --git a/App/TransCtrl.h b/App/TransCtrl.h new file mode 100755 index 0000000..37c3545 --- /dev/null +++ b/App/TransCtrl.h @@ -0,0 +1,56 @@ +#if !defined(AFX_TRANSCTRL_H__F0476EFB_2791_4112_92CF_D046E996934C__INCLUDED_) +#define AFX_TRANSCTRL_H__F0476EFB_2791_4112_92CF_D046E996934C__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// TransCtrl.h : header file +// + + +class CTransCtrl{ +// Construction +public: + int DoDesktopLock( ); + BOOL InstallHook( ); + void RemoveHook( ); + void ShowButton( BOOL bShow ); + void DestroyButton( ); + void CreateButton( ); + void CheckExtStyles( ); + void Hide( ); + void ShowIcons( ); + void HotTracking( BOOL install = true, int hovertime = 0 ); + void UndoTransparent( COLORREF color ); + void SetTextColor( ); + void SetTextColorEx( COLORREF color ); + void SetTextColorEx2( COLORREF color ); + void SetTransparent( ); + int TestDesktop( ); + int DoHitTest( int nShowButton ); + COLORREF GetBGColor( ); + COLORREF GetTextColor( ); + HWND GetDesktopListView( ); + HWND GetWnd( ) { return m_hDeskListViewWnd; } + + BOOL IsRes_x86Loaded(){ return ( hInst_res_x86 != NULL ); } + + CTransCtrl( ); + virtual ~CTransCtrl( ); +protected: + BOOL m_bHooked; + COLORREF m_textcolor; + HWND m_hDeskListViewWnd; + HWND m_hButtonWnd; + HHOOK m_hhook; + +private: + HINSTANCE hInst_res_x86; +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_TRANSCTRL_H__F0476EFB_2791_4112_92CF_D046E996934C__INCLUDED_) diff --git a/7/_Button.cpp b/App/_Button.cpp old mode 100644 new mode 100755 similarity index 100% rename from 7/_Button.cpp rename to App/_Button.cpp diff --git a/7/_Button.h b/App/_Button.h old mode 100644 new mode 100755 similarity index 100% rename from 7/_Button.h rename to App/_Button.h diff --git a/App/_Splash.cpp b/App/_Splash.cpp new file mode 100755 index 0000000..90d311a --- /dev/null +++ b/App/_Splash.cpp @@ -0,0 +1,43 @@ +/////////////////////////////////////////////////////////////////////////////// +//// _Button.cpp +// + +#include "stdafx.h" +#include "simplytransparent.h" +#include "_Splash.h" + + +static BOOL CALLBACK SplashWndProc(HWND, UINT, WPARAM, LPARAM ); + +/////////////////////////////////////////////////////////////////////////////// +///// Splash Window Proc +// +void Splash( HINSTANCE hinstance ) +{ + DialogBox( hinstance, (LPCTSTR)IDD_SPLASH, + NULL, (DLGPROC)SplashWndProc ); +} + +static BOOL CALLBACK SplashWndProc(HWND hWnd, UINT message, + WPARAM wParam, LPARAM lParam ) +{ + switch ( message ) + { + case WM_INITDIALOG: + __AnimateWindow( hWnd, 1000, AW_ACTIVATE|AW_BLEND ); + ShowWindow( hWnd, SW_SHOW ); + InvalidateRect( hWnd, 0, true ); + SetTimer( hWnd, 1, 1500, NULL ); + return true; + + case WM_CLOSE: + case WM_TIMER: + case WM_LBUTTONUP: + case WM_RBUTTONUP: + KillTimer( hWnd, 1 ); + + EndDialog(hWnd, IDOK ); + return true; + } + return false; +} \ No newline at end of file diff --git a/App/_Splash.h b/App/_Splash.h new file mode 100755 index 0000000..6779789 --- /dev/null +++ b/App/_Splash.h @@ -0,0 +1,12 @@ +/////////////////////////////////////////////////////////////////////////////// +//// _Splash.h +// + +#ifndef ___SPLASH_WND_H__ +#define ___SPLASH_WND_H__ + +void Splash( HINSTANCE hinstance ); + + +#endif //___SPLASH_WND_H__ + diff --git a/App/getwnd.h b/App/getwnd.h new file mode 100755 index 0000000..4227015 --- /dev/null +++ b/App/getwnd.h @@ -0,0 +1,95 @@ + + + +#ifndef __get_wnd_h_____ +#define __get_wnd_h_____ + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +inline HWND __GetProgramManager( ) +{ + HWND hwnd = GetDesktopWindow( ); + hwnd = FindWindowEx( hwnd, 0, "Progman", "Program Manager" ); + return hwnd; +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +inline HWND __GetShellDefView( ) +{ + HWND hwnd = __GetProgramManager( ); + if( hwnd ) + { + + // look among progman's children for the shell default view + hwnd = FindWindowEx( hwnd, 0, "SHELLDLL_DefView", NULL ); + + if( !hwnd ) + { + #ifdef _SHOW_DEBUG_MESSAGES + __Message( "Can't Find SHELLDLL_DefView" ); + #endif + } + } + + return hwnd; +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +inline HWND __GetTrayWnd( ) +{ + HWND hwnd = GetDesktopWindow( ); + hwnd = FindWindowEx( hwnd, 0, "Shell_TrayWnd", "" ); + return hwnd; +} + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +inline HWND __GetDesktopListView( ) +{ + HWND hwnd = __GetShellDefView(); + if(hwnd!=NULL) + { + // then, get the listview + hwnd = FindWindowEx( hwnd, 0, "SysListView32", NULL ); + } + +#ifdef _SHOW_DEBUG_MESSAGES + if( !hwnd ) + __Message( "Simply Transparent can not find the Desktop's Handle!" ); +#endif + + return hwnd; +} + + + + + + + +#endif //__get_wnd_h_____ \ No newline at end of file diff --git a/App/main.cpp b/App/main.cpp new file mode 100755 index 0000000..09e0919 --- /dev/null +++ b/App/main.cpp @@ -0,0 +1,867 @@ +/////////////////////////////////////////////////////////////////////////////// +//// main.cpp : Defines the Simply Transparent class +// +#include "stdafx.h" +#include "SimplyTransparent.h" +#include "main.h" + + +CMain::CMain( HINSTANCE hInstance, char * sCmdLine ) +{ + m_updating = false; + m_bShutdownReady = false; + m_bRunning = false; + m_bRes_loaded = false; + +/////////////////////////////////////////////////////////////////////////////// + __Comment( "Creating Desktop Control Object" ); + m_icons = new CTransCtrl( ); + + if( !m_icons->IsRes_x86Loaded( ) ) + { + + + __Comment( "===[ res_x86 library failed to load ]===" ); + + + //disable advances method + WriteIntSetting( "", "Lockmeth", 0 ); + + __Comment( "---{ Falling back to Brute Force method }---" ); + } + else m_bRes_loaded = true; +/////////////////////////////////////////////////////////////////////////////// + + m_tray = new CTrayIcon( ); + + LockInterface( unlock ); + + char string[MAX_PATH]; + + m_bFirstInstance = false; + m_ihevent = false; + m_lockevent = false; + + ASSERT( hInstance != NULL ); + m_hInst = hInstance; + + LoadString(hInstance, IDS_APP_TITLE, m_sTitle, MAX_LOADSTRING); + LoadString(hInstance, IDS_APP_CLASS, m_sClass, MAX_PATH); + + if( sCmdLine ) + sprintf( m_sCmdLine, "%s", sCmdLine ); + else memset( m_sCmdLine , 0, MAX_PATH ); + ___makelower( m_sCmdLine ); + + GetModuleFileName( hInstance, m_sApppath, MAX_PATH ); + ___makelower( m_sApppath ); + sprintf( string, "Path: %s", m_sApppath ); + __Comment( string ); + + + ___makelower( m_sClass ); + sprintf( string, "Window Class: %s", m_sClass ); + __Comment( string ); + + + SetCurrentDirectory( ___left( m_sApppath, + ___reversefind( m_sApppath, '\\') ).c_str( ) ); + + __Comment ( "CMain constructed" ); +} + + + + + +CMain::~CMain( ) +{ + __Comment ( "Stopping timers" ); + KillTimer( m_hWnd, IDC_METHOD ); + KillTimer( m_hWnd, IDC_ICON_HIDE ); + KillTimer( m_hWnd, ID_TRAY ); + KillTimer( m_hWnd, ID_ADPOLL ); + + + m_icons->DestroyButton(); + WriteIntSetting( "res_x86", "IHvis", 1 ); + + + if( m_bFirstInstance ) + { + m_icons->RemoveHook( ); + + __Comment( "Restoring default colors..." ); + RestoreOriginalColors( ); + + + + __Comment( "Window unregistered..." ); + UnregisterClass( m_sClass, m_hInst ); + + } + + delete m_icons; + delete m_tray; + + __Comment ( "CMain destructed" ); + +} +/////////////////////////////////////////////////////////////////////////// + + + + +void CMain::Restart( string flag ) +{ + char flags[MAX_STRING]; + sprintf( flags, "/nosplash /restart %s", flag.c_str( ) ); + ShellExecute( NULL, "open", m_sApppath, flags, 0, SW_SHOW); + + DestroyWindow( m_hWnd ); + +} + + + + +BOOL CMain::CheckCmdLine( string flag ) +{ + BOOL ret = false; + char cmdl[MAX_STRING]; + char *buf; + + sprintf( cmdl, "%s", m_sCmdLine ); + + buf = strtok( cmdl, " /" ); + while( buf ) + { + if( strcmp( flag.c_str( ), buf ) == 0 ) + ret = true; + + buf = strtok( 0, " /" ); + } + + return ret; +} + + +BOOL CMain::FirstInstance( ) +{ + BOOL ret = true; + + HWND win = FindWindow( m_sClass, m_sTitle ); + if(win != NULL) + { + __Comment( "program already running..." ); + ret = false; + } + + m_bFirstInstance = ret; + + return ret; +} + + + + +ATOM CMain::MyRegisterClass( HINSTANCE hInstance ) +{ + WNDCLASSEX wcex; + + wcex.cbSize = sizeof(WNDCLASSEX); + + wcex.style = CS_HREDRAW | CS_VREDRAW | CS_NOCLOSE; + wcex.lpfnWndProc = (WNDPROC)WndProc; + wcex.cbClsExtra = 0; + wcex.cbWndExtra = 0; + wcex.hInstance = hInstance; + wcex.hIcon = LoadIcon(hInstance, + (LPCTSTR)IDI_SIMPLYTRANSPARENT); + wcex.hCursor = LoadCursor(NULL, IDC_ARROW); + wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); + wcex.lpszMenuName = (LPCSTR)IDC_SIMPLYTRANSPARENT; + wcex.lpszClassName = m_sClass; + wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)ID_TRAY); + + return RegisterClassEx(&wcex); +} + + + + +int CMain::Run ( ) +{ + __Comment ( "Entered main loop" ); + + m_bRunning = true; + + if( CheckCmdLine( "options" ) ) + PostMessage( m_hWnd, WM_SHOW_OPTIONS, 577, (LPARAM)m_hWnd ); + else if( CheckCmdLine( "textcolor" ) ) + PostMessage( m_hWnd, WM_SHOW_TEXTCOLOR, 577, (LPARAM)m_hWnd ); + else if( CheckCmdLine( "about" ) ) + PostMessage( m_hWnd, WM_SHOW_ABOUT, 577, (LPARAM)m_hWnd ); + else if( CheckCmdLine( "update" ) ) + PostMessage( m_hWnd, WM_GET_UPDATES, 577, (LPARAM)m_hWnd ); + + MSG msg; + while (GetMessage(&msg, NULL, 0, 0)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + + } + + __Comment ( "Exited main loop" ); + + return msg.wParam; +} + + + + +BOOL CMain::InitInstance( ) +{ + +/////////////////////////////////////////////////////////////////////////////// + + if( !FirstInstance( ) ) + { + if( !CheckCmdLine( "restart" ) ) + return false; + else{ + do{ + for( int x=0; ( !FirstInstance( ) && x<30 ); x++ ) + Sleep( 1500 ); + + if( __Message( IDS_WAITING, MB_YESNO ) != IDYES ) + break; + } + while( !FirstInstance( ) ); + + if(!FirstInstance( ))return false; + } + + } + + + +/////////////////////////////////////////////////////////////////////////////// + + + if( ReadIntSetting( "", "ADpoll", ACTIVEDESKTOP_POLLING ) ) + if( __ADenabled( true ) ) + return false; + + +/////////////////////////////////////////////////////////////////////////////// + + /////////////////////////////////////////////////////////////////////////////// + if( MyRegisterClass( m_hInst ) == 0 ) + __Error( "Could not register class" ); + + RECT r_screen; + GetWindowRect( GetDesktopWindow(), &r_screen); + + //create the window (hidden of course) to the same size of the desktop + //so we always get messages + m_hWnd = CreateWindow(m_sClass, m_sTitle, WS_CAPTION|WS_SYSMENU, + 0, 0, r_screen.right, r_screen.bottom, NULL, NULL, m_hInst, NULL); + + char wnd[30]; + sprintf( wnd, "Window Handle: 0x%X", m_hWnd ); + __Comment( wnd ); + + if (!m_hWnd) + return false; + + + m_icons->SetTransparent( ); + m_icons->SetTextColorEx( ReadRGBSetting( "res_x86", "textcolor", "255,255,255" ) ); + + + WriteIntSetting( "res_x86", "deftxtclr", + ( m_icons->GetTextColor() == _BLACK ) ? 0 : 1 ); + + + //create tray icon...and show it(unless user prefers not to) + m_tray->InitTrayIcon( m_hInst, ID_TRAY ); + + m_tray->SetNotificationWnd( m_hWnd, WM_MY_TRAY_NOTIFICATION ); + + if( ReadIntSetting( "", "TrayIcon", TRAYICON ) != 0 ) + m_tray->SetIcon( ID_TRAY ); + + m_tray->SetDefault( IDM_ABOUT ); + + + UpdateWindow(m_hWnd); + + + __Comment( "Setting IDLE priority..." ); + if( !SetPriorityClass( GetCurrentProcess( ), IDLE_PRIORITY_CLASS ) ) + __Error( GetLastError( ) ); + + __Comment ( "InitInstance Success..." ); + return TRUE; +} + + + + +void CMain::LoadSettings( ) +{ + __Comment( "Loading Application Settings" ); + + m_tray->CheckMenuItem( ID_STARTUP, + __DoesStartWithWindows( m_sApppath, m_sTitle, m_hWnd ) ); + + m_tray->CheckMenuItem( ID_BEGINNERMODE, + ReadIntSetting( "", "NewUser", NEWUSER ) ); + + m_tray->CheckMenuItem( ID_SHOWSPLASH, + ReadIntSetting( "", "Splash", SPLASH ) ); + + + ////////////////////////////////////////////////////////////////////// + + if( ReadIntSetting( "", "Lockmeth", LOCKMETHOD ) == 1 ) + { + __Comment ( "Installing Hook" ); + + if( !m_icons->InstallHook( ) ) + { + + __Comment( "===[ Hook Failed! ]===" ); + + + //Hook failed...switch modes + WriteIntSetting( "", "Lockmeth", 0 ); + + //brute force! :P + SetTimer( m_hWnd, IDC_METHOD, + ReadIntSetting( "", "LockMeth1Time", LOCKMETHODTIME ), NULL ); + + __Comment( "--{ falling back to Brute Force mode }---" ); + } + + } + else + SetTimer( m_hWnd, IDC_METHOD, + ReadIntSetting( "", "LockMeth1Time", LOCKMETHODTIME ), NULL ); + + SetOptions( ); + +} + + + +void CMain::SetOptions( ) +{ + KillTimer( m_hWnd, IDC_ICON_HIDE ); + KillTimer( m_hWnd, ID_ADPOLL ); + KillTimer( m_hWnd, ID_TRAY ); + + m_icons->HotTracking( + ReadIntSetting( "res_x86", "HoverEffect", HOVEREFFECT ), + ReadIntSetting( "res_x86", "HoverTime", HOVERTIME ) ); + + if( ReadIntSetting( "res_x86","IHmethod", ICONHIDE_METHOD ) > 0 ) + SetTimer( m_hWnd, IDC_ICON_HIDE, + ReadIntSetting( "res_x86", "IHRespon", ICONHIDE_RESPON ), NULL ); + else + { + WriteIntSetting( "res_x86", "IHvis", 1 ); + m_icons->ShowIcons( ); + } + + if( ReadIntSetting( "", "ADpoll", ACTIVEDESKTOP_POLLING ) ) + SetTimer( m_hWnd, ID_ADPOLL, 5000, NULL ); + + m_icons->SetTextColorEx( ReadRGBSetting( "res_x86", "textcolor", "255,255,255" ) ); + + /////////////////////////////////////////////////////////////////////// + //// Enable - Disable options + // + + if( ReadIntSetting( "", "TrayIcon", TRAYICON ) != 0 ) + { + m_tray->SetIcon( ID_TRAY ); + SetTimer( m_hWnd, ID_TRAY, 5000, NULL ); + } + else + { + m_tray->SetIcon( NULL ); + + if( m_bRunning && ReadIntSetting( "", "TrayIcon-Changed", 1 ) ) + __Message( "You have choosen to hide the tray icon\nTo get the icon back, rerun Simply Transparent" ); + } + + if( ReadIntSetting( "", "Logging", LOGGING ) ) + { + if ( !_CheckLogger( ) ) + _InitLogger( ); + } + else + if ( _CheckLogger( ) ) + _CloseLogger( ); + + + if( ReadIntSetting( "res_x86", "IHButton", ICONHIDE_BUTTON ) && + ReadIntSetting( "res_x86","IHmethod", ICONHIDE_METHOD ) == 1 ) + m_icons->CreateButton( ); + else + m_icons->DestroyButton( ); +} + + + +/////////////////////////////////////////////////////////////////////////////// +//// External Comm event handlers +// + +LRESULT CMain::OnRestart(WPARAM AccessCode, LPARAM Color){ + LRESULT lRetrun = 0; + + Restart("/winkeyd"); + + return lRetrun; +} + + + + + +LRESULT CMain::OnRemoteSetTextColor(WPARAM AccessCode, LPARAM Color){ + LRESULT lRetrun = 0; + + if(AccessCode == 0){ + m_icons->SetTextColorEx2((COLORREF)Color); + lRetrun = Color; + } + + return lRetrun; +} + + + + + +LRESULT CMain::OnBeginExitNotification(WPARAM uID, LPARAM lEvent){ + LRESULT lRetrun = 0; + + if((uID == 321)&(lEvent == 147)){ + lRetrun = 123; + } + return lRetrun; +} + + + + +LRESULT CMain::OnExitNotification(WPARAM uID, LPARAM lEvent){ + + LRESULT lRetrun = 0; + + if((uID == 321)&(lEvent == 147)){ + DestroyWindow( m_hWnd ); + } + + return lRetrun; +} + + + + +LRESULT CMain::OnTrayNotification(WPARAM uID, LPARAM lEvent) +{ + if( ( ReadIntSetting( "res_x86","IHmethod", ICONHIDE_METHOD ) == 2 ) + && ( + lEvent == WM_LBUTTONDBLCLK + || lEvent == WM_MBUTTONDBLCLK + || lEvent == WM_MBUTTONUP + || lEvent == WM_LBUTTONUP + ) ) + { + ShowhideIcons(); + return 0; + } + + if( IsInterfaceLocked( ) )return 0; + + return m_tray->OnTrayNotification(uID, lEvent); +} + + + + +LRESULT CMain::OnShowTrayNotification( WPARAM wp, LPARAM lp ) +{ + + if( wp == 577 && lp == (LONG)m_hWnd ) + { + WriteIntSetting( "", "TrayIcon", TRAYICON ); + SetOptions( ); + } + + + return 0; +} + + + +/////////////////////////////////////////////////////////////////////////////// +//// Misc. Event Handlers +// +void CMain::OnTimer( DWORD event ) +{ + int n; + + switch( event) + { + case IDC_METHOD: + + // prevent re-entry + if( m_lockevent ) + break; + + m_lockevent = true; + + + if( !m_icons->DoDesktopLock( ) ) + KillTimer( m_hWnd, IDC_METHOD ); + + + m_lockevent = false; + + break; + + case IDC_ICON_HIDE: + + //Prevent re-entry + if( m_ihevent ) + break; + + m_ihevent = true; + + n = ReadIntSetting( "res_x86","IHmethod", ICONHIDE_METHOD ); + + if( n == 1 ) + { + n = ReadIntSetting( "res_x86", "IHButton", ICONHIDE_BUTTON ); + n = m_icons->DoHitTest( n ); + if( n == 1 ) + m_icons->ShowIcons( ); + else if( n == -1 ) + KillTimer( m_hWnd, IDC_ICON_HIDE ); + } + else KillTimer( m_hWnd, IDC_ICON_HIDE ); + + m_ihevent = false; + + break; + + //Keep the tray icon accessable. + case ID_TRAY: + if( ReadIntSetting( "", "TrayIcon", TRAYICON ) != 0 ) + m_tray->SetIcon( ID_TRAY ); + break; + + case ID_ADPOLL: + //check to see if Active Desktop is enabled. + if( __ADenabled( false ) ) + { + __Comment( "Active Desktop's Web View was enabled!...exiting" ); + + KillTimer( m_hWnd, ID_ADPOLL ); + + + char mes[MAX_STRING]; + LoadString( m_hInst, IDS_ERROR_ACTIVE_DESKTOP_ENABLED, + mes, MAX_STRING ); + __Message( mes ); + DestroyWindow( m_hWnd ); + + } + break; + } + +} + + + + +/////////////////////////////////////////////////////////////////////////////// +//// Menu Event Handlers +// + +void CMain::OnAbout( ) +{ + + LockInterface( lock ); + + __Comment ( "Opening AboutBox..." ); + DialogBox( m_hInst, (LPCTSTR)IDD_ABOUTBOX, + m_hWnd, (DLGPROC)About ); + + + LockInterface( unlock ); +} + + + + + + +void CMain::OnSettextcolor( ) +{ + + LockInterface( lock ); + + m_icons->SetTextColor( ); + + LockInterface( unlock ); +} + + + + +void CMain::OnOptions( ) +{ + + LockInterface( lock ); + + int now, prev = ReadIntSetting( "", "Lockmeth", LOCKMETHOD ); + int ti_now, ti_prev = ReadIntSetting( "", "TrayIcon", TRAYICON ); + + Options( m_hWnd ); + + now = ReadIntSetting( "", "Lockmeth", LOCKMETHOD ); + ti_now = ReadIntSetting( "", "TrayIcon", TRAYICON ); + + if(ti_now != ti_prev) + WriteIntSetting( "", "TrayIcon-Changed", 1 ); + else + WriteIntSetting( "", "TrayIcon-Changed", 0 ); + + SetOptions( ); + + + + if( now != prev ) + { + Restart( "/changedlock" ); + } + + LockInterface( unlock ); +} + + + + +void CMain::OnHelp( ) +{ + char file[MAX_PATH]; + + sprintf( file, "%s.chm", + ___left( m_sApppath, ___reversefind( m_sApppath, '.' ) ).c_str( ) ); + + string s = "Help File: "; + s += file; + + __Comment( s.c_str( ) ); + + ShellExecute( this->m_hWnd, "open", "hh.exe", file, 0, SW_SHOW ); +} + + + + +void CMain::OnUpdateCheck( ) +{ + if(!m_updating) + { + m_updating = true; + + UpdateCheck( 7, 1, false ); + + m_updating = false; + } + else + { + LockInterface( lock ); + __Message( "Simply Transparent is already checking for an update" ); + LockInterface( unlock ); + } +} + + + + +void CMain::OnShowSplash( ) +{ + BOOL spl = ReadIntSetting( "", "Splash", SPLASH ); + + WriteIntSetting( "", "Splash", !spl ); + + m_tray->CheckMenuItem( ID_SHOWSPLASH, !spl ); +} + + + + +void CMain::OnStartup( ) +{ + + LockInterface( lock ); + + char warn[MAX_STRING]; + LoadString( m_hInst, IDS_STARTUPW, warn, MAX_STRING); + + BOOL bContinue = true, + bStart = __DoesStartWithWindows( m_sApppath, m_sTitle, m_hWnd ); + + if( ReadIntSetting( "", "NewUser", NEWUSER ) ) + { + if( bStart ) + bContinue = + ( __Message( warn, MB_YESNO ) == IDYES ) + ? true : false; + } + + if(bContinue) + { + if( !__StartWithWindows( !bStart, m_sApppath, m_sTitle, m_hWnd ) ) + { + sprintf( warn, "Unable to make %s Start with Windows.", + m_sTitle ); + __Message( warn ); + } + else + bStart = !bStart; + + m_tray->CheckMenuItem( ID_STARTUP, bStart ); + } + + LockInterface( unlock ); +} + + + + +void CMain::OnBeginnerMode( ) +{ + + LockInterface( lock ); + + BOOL begin = ReadIntSetting( "", "NewUser", NEWUSER ), + bContinue = true; + + char warn[MAX_STRING]; + LoadString( m_hInst, IDS_NEWUSERW, warn, MAX_STRING); + + if( begin ) + bContinue = + ( __Message( warn, MB_YESNO ) == IDYES ) + ? true : false; + + if( bContinue ){ + begin = !begin; + WriteIntSetting( "", "NewUser", begin ); + } + + m_tray->CheckMenuItem( ID_BEGINNERMODE, begin ); + + LockInterface( unlock ); +} + + + + + +int CMain::OnExit( ) +{ + LockInterface( lock ); + + __Comment ( "User Selected to Exit..." ); + + BOOL begin = ReadIntSetting( "", "NewUser", NEWUSER ), + bContinue = true; + + char warn[MAX_STRING]; + LoadString( m_hInst, IDS_EXITW, warn, MAX_STRING); + + if( begin ) + bContinue = + ( __Message( warn, MB_YESNO ) == IDYES ) + ? true : false; + + + LockInterface( unlock ); + + if( bContinue ) + return 1; + + __Comment ( "User aborted the Exit..." ); + + return 0; +} + + + + + + +LRESULT CMain::OnQueryEndSession( ) +{ + + if( !m_bShutdownReady ) + { + __Comment( "Windows is Shutting down...MUST exit now!" ); + + KillTimer( m_hWnd, IDC_METHOD ); + KillTimer( m_hWnd, IDC_ICON_HIDE ); + KillTimer( m_hWnd, ID_TRAY ); + KillTimer( m_hWnd, ID_ADPOLL ); + + m_icons->RemoveHook( ); + + m_bShutdownReady = true; + + DestroyWindow( m_hWnd ); + + + // return 0; + } + + return 1; +} + + + + +/////////////////////////////////////////////////////////////////////////////// +//// Functions +// +void CMain::ShowhideIcons( ) +{ + BOOL bShow = ReadIntSetting( "res_x86", "IHvis", 1); + WriteIntSetting( "res_x86", "IHvis", !bShow ); + + if( bShow ) + m_icons->ShowIcons( ); + else + m_icons->Hide( ); +} + + + + +void CMain::RestoreOriginalColors( ) +{ + m_icons->SetTextColorEx( + ReadIntSetting( "res_x86", "deftxtclr", 1 ) ? _WHITE : _BLACK ); + + m_icons->UndoTransparent( GetSysColor( COLOR_DESKTOP ) ); +} \ No newline at end of file diff --git a/App/main.h b/App/main.h new file mode 100755 index 0000000..9e72a6d --- /dev/null +++ b/App/main.h @@ -0,0 +1,120 @@ +/////////////////////////////////////////////////////////////////////////////// +///// main.h +/// + +#ifndef ____MAIN_H__________ +#define ____MAIN_H__________ + +#include "trayicon.h" +#include "TransCtrl.h" + + +class CMain +{ +public: + enum Lock { lock, unlock, nutral }; + + CMain( HINSTANCE hInstance = NULL, char * sCmdLine = NULL ); + ~CMain(); + + BOOL FirstInstance( ); + BOOL InitInstance( ); + BOOL CheckCmdLine( string flag ); + + + ATOM MyRegisterClass(HINSTANCE hInstance); + + int Run ( ); + + void LoadSettings( ); + void SetOptions( ); + void Restart( string flag ); + + HINSTANCE GetInstanceHandle( ) { return m_hInst; } + HWND GetWindowHandle( ) { return m_hWnd; } + HWND GetDLCWnd( ) { return m_icons->GetWnd( ); } + string GetName( ) { return m_sTitle; } + + BOOL IsRes_Loaded( ) { return m_bRes_loaded; } + BOOL IsInterfaceLocked( ) { return m_bInterfaceLock; } + void LockInterface( Lock l = nutral ) + { + switch( l ) + { + case nutral: + m_bInterfaceLock = !m_bInterfaceLock; + break; + case lock: + m_bInterfaceLock = true; + break; + case unlock: + m_bInterfaceLock = false; + break; + default:break; + } + } + + + + +/////////////////////////////////////////////////////////////////////////////// +//// External Comm event handlers +// + LRESULT OnRestart( WPARAM AccessCode, LPARAM Color ); + LRESULT OnRemoteSetTextColor( WPARAM AccessCode, LPARAM Color ); + LRESULT OnBeginExitNotification( WPARAM uID, LPARAM lEvent ); + LRESULT OnExitNotification( WPARAM uID, LPARAM lEvent ); + LRESULT OnTrayNotification( WPARAM uID, LPARAM lEvent ); + LRESULT OnShowTrayNotification( WPARAM wp, LPARAM lp ); + LRESULT OnQueryEndSession( ); + +/////////////////////////////////////////////////////////////////////////////// +//// Misc. Event Handlers +// + void OnTimer( DWORD event ); + +/////////////////////////////////////////////////////////////////////////////// +//// Menu Event Handlers +// + void OnAbout( ); + void OnSettextcolor( ); + void OnOptions( ); + void OnHelp( ); + void OnUpdateCheck( ); + void OnShowSplash( ); + void OnStartup( ); + void OnBeginnerMode( ); + int OnExit( ); + +/////////////////////////////////////////////////////////////////////////////// +//// Functions +// + void ShowhideIcons( ); + void RestoreOriginalColors( ); + + + + +protected: + BOOL m_updating; + BOOL m_bInterfaceLock; + + BOOL m_ihevent; + BOOL m_lockevent; + BOOL m_bFirstInstance; + BOOL m_bRunning; + BOOL m_bShutdownReady; + BOOL m_bRes_loaded; + char m_sCmdLine[MAX_PATH]; + char m_sClass[MAX_PATH]; + char m_sApppath[MAX_PATH]; + char m_sTitle[MAX_LOADSTRING]; + HINSTANCE m_hInst; + HWND m_hWnd; + CTrayIcon* m_tray; + CTransCtrl* m_icons; + +}; + + +#endif //____MAIN_H__________ \ No newline at end of file diff --git a/App/res/2.bmp b/App/res/2.bmp new file mode 100755 index 0000000..6cedaeb Binary files /dev/null and b/App/res/2.bmp differ diff --git a/7/res/Graphic2.bmp b/App/res/Graphic2.bmp old mode 100644 new mode 100755 similarity index 100% rename from 7/res/Graphic2.bmp rename to App/res/Graphic2.bmp diff --git a/App/res/SimplyTransparent.ico b/App/res/SimplyTransparent.ico new file mode 100755 index 0000000..6b0fb7c Binary files /dev/null and b/App/res/SimplyTransparent.ico differ diff --git a/App/res/Tray.ico b/App/res/Tray.ico new file mode 100755 index 0000000..34552c2 Binary files /dev/null and b/App/res/Tray.ico differ diff --git a/7/res/about graphic.psd b/App/res/about graphic.psd old mode 100644 new mode 100755 similarity index 100% rename from 7/res/about graphic.psd rename to App/res/about graphic.psd diff --git a/App/res/arrow.ico b/App/res/arrow.ico new file mode 100755 index 0000000..29ea20a Binary files /dev/null and b/App/res/arrow.ico differ diff --git a/App/res/bitmap1.bmp b/App/res/bitmap1.bmp new file mode 100755 index 0000000..5c23366 Binary files /dev/null and b/App/res/bitmap1.bmp differ diff --git a/App/res/bitmap2.bmp b/App/res/bitmap2.bmp new file mode 100755 index 0000000..8c2e922 Binary files /dev/null and b/App/res/bitmap2.bmp differ diff --git a/App/res/bmp00002.bmp b/App/res/bmp00002.bmp new file mode 100755 index 0000000..b718de9 Binary files /dev/null and b/App/res/bmp00002.bmp differ diff --git a/App/res/donate.bmp b/App/res/donate.bmp new file mode 100755 index 0000000..dcdf7d2 Binary files /dev/null and b/App/res/donate.bmp differ diff --git a/7/res/splash-1.bmp b/App/res/splash-1.bmp old mode 100644 new mode 100755 similarity index 100% rename from 7/res/splash-1.bmp rename to App/res/splash-1.bmp diff --git a/7/res/splash.psd b/App/res/splash.psd old mode 100644 new mode 100755 similarity index 100% rename from 7/res/splash.psd rename to App/res/splash.psd diff --git a/App/res/tray.bmp b/App/res/tray.bmp new file mode 100755 index 0000000..f27c486 Binary files /dev/null and b/App/res/tray.bmp differ diff --git a/App/res_x86/CfgFuncs.cpp b/App/res_x86/CfgFuncs.cpp new file mode 100755 index 0000000..a6c9aa0 --- /dev/null +++ b/App/res_x86/CfgFuncs.cpp @@ -0,0 +1,117 @@ +/////////////////////////////////////////////////////////////////////////////// +//// Configuration Functions +// +#include "stdafx.h" +#include "CfgFuncs.h" + + + +COLORREF rgb_from_text( string txt_rgb ) +{ + + int R,G,B; + char color[15]; + char * buf; + + txt_rgb.copy( color, 15 ); + + buf = strtok( color, "," ); + R = atoi( buf ); + + buf = strtok( 0, "," ); + G = atoi( buf ); + + buf = strtok( 0, "," ); + B = atoi( buf ); + + return RGB(R,G,B); +} + + + + + + + + + + + + +string rgb_to_text( COLORREF c )//char[15] +{ + char color_rgb[15]; + sprintf( color_rgb, "%d,%d,%d", GetRValue(c), GetGValue(c), GetBValue(c) ); + + string color = color_rgb; + + return color; +} + + + + + + + + + + +DWORD ReadIntSetting( string section, string lable, DWORD def ) +{ + DWORD x = 0; + if( ReadSetting( (char *)section.c_str(), (char *)lable.c_str(), &x, REG_DWORD ) == false ) + return def; + + return x; +} + + + + + + + + + +void WriteIntSetting( string section, string lable, int data ) +{ + WriteSetting( (char *)section.c_str(), (char *)lable.c_str(), &data ); +} + + + + + + + + + + + +DWORD ReadRGBSetting( string section, string lable, string def ) +{ + COLORREF x = rgb_from_text( def ); + DWORD s=2; + char *n = new char[50]; + memset( n, 0, 50 ); + + s = ReadSetting( (char *)section.c_str(), (char *)lable.c_str(), n, REG_SZ ); + if( s > 1 ) + { + delete n; + char *n = new char[s]; + memset( n, 0, 50 ); + s = ReadSetting( (char *)section.c_str(), (char *)lable.c_str(), n, REG_SZ ); + } + + + if(s == TRUE) + x = rgb_from_text( n ); + + return x; +} + + + + diff --git a/App/res_x86/CfgFuncs.h b/App/res_x86/CfgFuncs.h new file mode 100755 index 0000000..87ae9de --- /dev/null +++ b/App/res_x86/CfgFuncs.h @@ -0,0 +1,134 @@ +/////////////////////////////////////////////////////////////////////////////// +//// Configuration Functions header file (CfgFuncs.h) +// + +#ifndef ____CFG_FUNCS_H___ +#define ____CFG_FUNCS_H___ + +#include "resource.h" +#include +#include +using namespace std; + +COLORREF rgb_from_text( string txt_rgb ); +string rgb_to_text( COLORREF c ); + +DWORD ReadIntSetting( string section, string lable, DWORD def ); +void WriteIntSetting( string section, string lable, int data ); + +DWORD ReadRGBSetting( string section, string lable, string def ); + +template +inline int WriteSetting( char section[], char lable[], T *data ) +{ + int ret = 1; + + try{ + + const unsigned int string_size = 50; + + DWORD disposition; + LONG res = 0; + HKEY softkey = NULL, key = NULL; + char subkey[MAX_PATH]; + char appname[string_size]; + char author[string_size]; + + LoadString( GetMyInstanceHandle( ), IDS_APP_TITLE, + appname, string_size ); + + LoadString( GetMyInstanceHandle( ), IDS_REGISTRY_KEY, + author, string_size ); + + sprintf( subkey, "%s\\%s\\%s", author, appname, section ); + + res = RegOpenKeyEx( HKEY_CURRENT_USER, "software", 0, KEY_WRITE, + &softkey ); + if( ERROR_SUCCESS == res ) + { + res = RegCreateKeyEx( softkey, subkey, 0, "key", + REG_OPTION_NON_VOLATILE, KEY_WRITE, 0, &key, &disposition ); + if( ERROR_SUCCESS == res ) + { + res = RegSetValueEx(key, lable, 0, + ( sizeof( *data ) == sizeof( char ) ) ? REG_SZ : REG_DWORD, + (BYTE*)data, ( sizeof( *data ) == sizeof( char ) ) ? strlen( (const char *) data ) : sizeof( data ) ); + if( ERROR_SUCCESS == res ) + { + ret = 0; + } + } + } + + RegCloseKey( softkey ); + RegCloseKey( key ); + + }catch(...){ + + __Message( "WriteSetting( )" ); + + } + + return ret; +} + + + + + + + + + + + + + +template +inline DWORD ReadSetting( char section[], char lable[], T *data, DWORD type ) +{ + LONG res = 0; + const unsigned int string_size = 100; + DWORD size = sizeof(data); + HKEY key = NULL; + char subkey[MAX_PATH]; + static char appname[string_size] = "Simply Transparent"; + static char author[string_size] = "JonathanGrimes"; + /*static bool loaded_strings = false; + if( !loaded_strings ) + { + LoadString( GetMyInstanceHandle( ), IDS_APP_TITLE, appname, string_size ); + LoadString( GetMyInstanceHandle( ), IDS_REGISTRY_KEY, author, string_size ); + loaded_strings = true; + }*/ + + /* + sprintf( subkey, "Software\\%s\\%s\\%s", author, appname, section ); + + char debug[512]; + sprintf( debug, "%s\n%s\n%s", section, lable, subkey );*/ + + + + + res = RegOpenKeyEx( HKEY_CURRENT_USER, subkey, 0, KEY_QUERY_VALUE, &key ); + if( res != ERROR_SUCCESS ) + return false; + + res = RegQueryValueEx(key, lable, 0, &type, (BYTE*)data, &size ); + RegCloseKey( key ); + if(res != ERROR_SUCCESS) + { + if( res == ERROR_MORE_DATA ) + return size; + + //ErrorMessage( res ); + //MessageBox( 0, debug, " ", MB_OK ); + + return false; + } + + return true; +} + +#endif //____CFG_FUNCS_H___ \ No newline at end of file diff --git a/7/res_x86/Release/BuildLog.htm b/App/res_x86/Release/BuildLog.htm old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/Release/BuildLog.htm rename to App/res_x86/Release/BuildLog.htm diff --git a/7/res_x86/Release/CfgFuncs.obj b/App/res_x86/Release/CfgFuncs.obj old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/Release/CfgFuncs.obj rename to App/res_x86/Release/CfgFuncs.obj diff --git a/7/res_x86/Release/CfgFuncs.sbr b/App/res_x86/Release/CfgFuncs.sbr old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/Release/CfgFuncs.sbr rename to App/res_x86/Release/CfgFuncs.sbr diff --git a/7/res_x86/Release/StdAfx.obj b/App/res_x86/Release/StdAfx.obj old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/Release/StdAfx.obj rename to App/res_x86/Release/StdAfx.obj diff --git a/7/res_x86/Release/StdAfx.sbr b/App/res_x86/Release/StdAfx.sbr old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/Release/StdAfx.sbr rename to App/res_x86/Release/StdAfx.sbr diff --git a/7/res_x86/Release/res_x86.bsc b/App/res_x86/Release/res_x86.bsc old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/Release/res_x86.bsc rename to App/res_x86/Release/res_x86.bsc diff --git a/7/res_x86/Release/res_x86.exp b/App/res_x86/Release/res_x86.exp old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/Release/res_x86.exp rename to App/res_x86/Release/res_x86.exp diff --git a/7/res_x86/Release/res_x86.lib b/App/res_x86/Release/res_x86.lib old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/Release/res_x86.lib rename to App/res_x86/Release/res_x86.lib diff --git a/7/res_x86/Release/res_x86.obj b/App/res_x86/Release/res_x86.obj old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/Release/res_x86.obj rename to App/res_x86/Release/res_x86.obj diff --git a/7/res_x86/Release/res_x86.pch b/App/res_x86/Release/res_x86.pch old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/Release/res_x86.pch rename to App/res_x86/Release/res_x86.pch diff --git a/7/res_x86/Release/res_x86.sbr b/App/res_x86/Release/res_x86.sbr old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/Release/res_x86.sbr rename to App/res_x86/Release/res_x86.sbr diff --git a/7/res_x86/Release/resource.res b/App/res_x86/Release/resource.res old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/Release/resource.res rename to App/res_x86/Release/resource.res diff --git a/7/res_x86/Release/vc70.idb b/App/res_x86/Release/vc70.idb old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/Release/vc70.idb rename to App/res_x86/Release/vc70.idb diff --git a/App/res_x86/StdAfx.cpp b/App/res_x86/StdAfx.cpp new file mode 100755 index 0000000..ec39016 --- /dev/null +++ b/App/res_x86/StdAfx.cpp @@ -0,0 +1,65 @@ +// stdafx.cpp : source file that includes just the standard includes +// res_x86.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" +#include "resource.h" + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +void ErrorMessage( DWORD code ){ + LPVOID lpMsgBuf; + + FormatMessage( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + code, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language + (LPTSTR) &lpMsgBuf, + 0, + NULL + ); + + MessageBox( 0, (LPCTSTR)lpMsgBuf, "Simply Transparet: res_x86 Error", MB_OK ); + + LocalFree( lpMsgBuf ); +} + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// SendQuit( ) - Sends the Quit message to the main application WindProc +// +void SendQuit( ) +{ + char class_s[MAX_PATH]; + char title_s[MAX_PATH]; + + LoadString( GetMyInstanceHandle( ), + IDS_APP_CLASS, class_s, MAX_PATH); + LoadString( GetMyInstanceHandle( ), + IDS_APP_TITLE, title_s, MAX_PATH); + + for( unsigned int x = 0; x 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +// Insert your headers here +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + +#include +#include +#include +#include + +HINSTANCE GetMyInstanceHandle( ); +void ErrorMessage( DWORD code ); +void SendQuit( ); + +/////////////////////////////////////////////////////////////////////////////// +//// My MessageBox wrapper +// +inline int __Message( char* message ) + { return MessageBox( 0, message, "res_x86", MB_OK ); } + +inline BOOL IsWindowsNT( ) +{ + BOOL ret = false; + OSVERSIONINFO osver; + osver.dwOSVersionInfoSize = sizeof( osver ); + if( GetVersionEx( &osver ) ) + ret = ( osver.dwPlatformId == VER_PLATFORM_WIN32_NT ); + + return ret; +} + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__FEB60DA1_F089_4692_963C_23967E771EE2__INCLUDED_) diff --git a/App/res_x86/hook.h b/App/res_x86/hook.h new file mode 100755 index 0000000..e69de29 diff --git a/App/res_x86/res_x86.cpp b/App/res_x86/res_x86.cpp new file mode 100755 index 0000000..6fa0514 --- /dev/null +++ b/App/res_x86/res_x86.cpp @@ -0,0 +1,415 @@ +// res_x86.cpp : Defines the entry point for the DLL application. +// + +#include "stdafx.h" +#include "res_x86.h" +#include "CfgFuncs.h" + +#include "..\getwnd.h" + +#pragma data_seg (".Res_x86App") + static HHOOK g_hook = NULL; + static HWND g_deskctlwnd = NULL; + static HINSTANCE g_hmod = NULL; + static WNDPROC lpfDesktopWndProc = NULL; + static BOOL g_inited = false; +#pragma data_seg () +#pragma comment(linker, "/section:.Res_x86App,rws") + + +#define HOVEREFFECT 0 + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +HINSTANCE GetMyInstanceHandle( ){ return g_hmod; } + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +BOOL APIENTRY DllMain( HANDLE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + g_hmod = (HINSTANCE)hModule; + + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +static void Init() +{ + if( !g_deskctlwnd ) + g_deskctlwnd = __GetDesktopListView( ); + + if( !g_hook ) + g_hook = (HHOOK)ReadIntSetting( "res_x86","address",0 ); + + g_inited = true; +} + + + + +/////////////////////////////////////////////////////////////////////////////// +//// +// +static void TestData( ) +{ + if( !g_inited ) Init( ); + + if( !IsWindow( g_deskctlwnd ) ) + g_deskctlwnd = __GetDesktopListView( ); +} + + + + +/////////////////////////////////////////////////////////////////////////////// +///// Win9x hook: +// +LRESULT CALLBACK Win9xDesktopProc( int nCode, WPARAM wParam, LPARAM lParam ){ + + LPCWPSTRUCT msg = (LPCWPSTRUCT)lParam; + + TestData( ); + + if( ( nCode >= 0 ) && ( wParam == NULL ) ) + { + + switch( msg->message ) + { + + case LVM_SETTEXTBKCOLOR: + if( msg->hwnd == g_deskctlwnd ) + msg->lParam = ( LPARAM )( COLORREF )CLR_NONE; + break; + + case LVM_SETTEXTCOLOR: + if( msg->hwnd == g_deskctlwnd ) + if( wParam == 0 ) + { + msg->lParam = ListView_GetTextColor( msg->hwnd ); + InvalidateRect( msg->hwnd, 0, false ); + UpdateWindow( msg->hwnd ); + } + else wParam = 0; + + break; + + case LVM_SETEXTENDEDLISTVIEWSTYLE: + if( msg->hwnd == g_deskctlwnd ) + switch( ReadIntSetting( "res_x86", "HoverEffect", HOVEREFFECT ) ) + { + case 1: + msg->wParam = (WPARAM) LVS_EX_TRACKSELECT;//Mask + msg->lParam = (LPARAM) LVS_EX_TRACKSELECT; + break; + + case 2: + msg->wParam = (WPARAM) LVS_EX_TRACKSELECT + |LVS_EX_ONECLICKACTIVATE + |LVS_EX_UNDERLINEHOT;//Mask + msg->lParam = (LPARAM) LVS_EX_TRACKSELECT + |LVS_EX_ONECLICKACTIVATE + |LVS_EX_UNDERLINEHOT; + break; + + case 3: + msg->wParam = (WPARAM) LVS_EX_TRACKSELECT + |LVS_EX_ONECLICKACTIVATE + |LVS_EX_UNDERLINECOLD;//Mask + msg->lParam = (LPARAM) LVS_EX_TRACKSELECT + |LVS_EX_ONECLICKACTIVATE + |LVS_EX_UNDERLINECOLD; + break; + + default: + break; + } + break; + + case LVM_SETHOVERTIME: + if( msg->hwnd == g_deskctlwnd ) + { + if( ReadIntSetting( "res_x86", "HoverTime", 750 ) > 0 ) + { + msg->lParam = (LPARAM)(DWORD) + ReadIntSetting( "res_x86", "HoverTime", 1000 ); + } + + SetWindowPos( __GetDesktopListView( ), 0, 0, 0, 0, 0, + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER ); + + InvalidateRect( msg->hwnd, 0, true ); + } + break; + + + default: + break; + } + } + return CallNextHookEx( g_hook, nCode, wParam, lParam ); +} + + + + + + + + + + + + + + + + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// Win2k Desktop Proc +// +LRESULT CALLBACK DeskWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) +{ + TestData( ); + + switch( message ) + { + + case LVM_SETTEXTBKCOLOR: + lParam = CLR_NONE; + break; + + + case LVM_SETTEXTCOLOR: + if( wParam == 0 ) + { + lParam = ListView_GetTextColor( hwnd ); + + InvalidateRect( hwnd, 0, false ); + + SetWindowPos( __GetDesktopListView( ), 0, 0, 0, 0, 0, + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER ); + + InvalidateRect( hwnd, 0, false ); + UpdateWindow( hwnd ); + } + else wParam = 0; + + break; + + + case LVM_SETEXTENDEDLISTVIEWSTYLE: + + switch( ReadIntSetting( "res_x86", "HoverEffect", HOVEREFFECT ) ) + { + case 1: + wParam = (WPARAM) LVS_EX_TRACKSELECT;//Mask + lParam = (LPARAM) LVS_EX_TRACKSELECT; + break; + + case 2: + wParam = (WPARAM) LVS_EX_TRACKSELECT + |LVS_EX_ONECLICKACTIVATE + |LVS_EX_UNDERLINEHOT;//Mask + lParam = (LPARAM) LVS_EX_TRACKSELECT + |LVS_EX_ONECLICKACTIVATE + |LVS_EX_UNDERLINEHOT; + break; + + case 3: + wParam = (WPARAM) LVS_EX_TRACKSELECT + |LVS_EX_ONECLICKACTIVATE + |LVS_EX_UNDERLINECOLD;//Mask + lParam = (LPARAM) LVS_EX_TRACKSELECT + |LVS_EX_ONECLICKACTIVATE + |LVS_EX_UNDERLINECOLD; + break; + + default: + break; + } + + SetWindowPos( __GetDesktopListView( ), 0, 0, 0, 0, 0, + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER ); + + InvalidateRect( hwnd, 0, true ); + break; + + case LVM_SETHOVERTIME: + + if( ReadIntSetting( "res_x86", "HoverTime", 750 ) > 0 ) + { + lParam = (LPARAM)(DWORD) + ReadIntSetting( "res_x86", "HoverTime", 1000 ); + } + + SetWindowPos( __GetDesktopListView( ), 0, 0, 0, 0, 0, + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER ); + + InvalidateRect( hwnd, 0, true ); + break; + + default: + break; + } + + return CallWindowProc( lpfDesktopWndProc, hwnd, message, wParam, lParam ); +} + + + +void SubclassDesktop( ) +{ + + lpfDesktopWndProc = (WNDPROC)GetWindowLongPtr( __GetDesktopListView( ), GWLP_WNDPROC ); + if( lpfDesktopWndProc == 0) + ErrorMessage( GetLastError( ) ); + else + { + if( SetWindowLongPtr( __GetDesktopListView( ), GWLP_WNDPROC, (LONG_PTR)(WNDPROC)DeskWndProc ) == 0 ) + ErrorMessage( GetLastError( ) ); + else + { + //Success + SetWindowPos( __GetDesktopListView( ), 0, 0, 0, 0, 0, + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER ); + + SetFocus( __GetDesktopListView( ) ); + } + } +} + + +void UnSubclassDesktop( ) +{ + + if( SetWindowLongPtr( __GetDesktopListView( ), GWLP_WNDPROC, (LONG_PTR)lpfDesktopWndProc ) == 0 ) + ErrorMessage( GetLastError( ) ); + else + { + //Success + SetWindowPos( __GetDesktopListView( ), 0, 0, 0, 0, 0, + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER ); + + SetFocus( __GetDesktopListView( ) ); + } + +} + + + + +LRESULT CALLBACK SubclassMangr( int nCode, WPARAM wParam, LPARAM lParam ){ + + LPCWPSTRUCT msg = (LPCWPSTRUCT)lParam; + + TestData( ); + + if( g_deskctlwnd == msg->hwnd ) + { + switch( msg->message ) + { + case WM_USER+10: + SubclassDesktop( ); + break; + + case WM_USER+20: + UnSubclassDesktop( ); + break; + + default:break; + } + } + + + return CallNextHookEx( g_hook, nCode, wParam, lParam ); +} + + + + +RES_x86API DWORD WINAPI StartHookThreadProc( void ) +{ + if( ReadIntSetting( "res_x86", "installed", 0 ) ) + return ERROR_ACCESS_DENIED; + + Init( ); + + if( IsWindowsNT( ) ) + { + g_hook = SetWindowsHookEx( WH_CALLWNDPROC, + SubclassMangr, GetMyInstanceHandle( ), 0 ); + } + else + { + g_hook = SetWindowsHookEx( WH_CALLWNDPROC, + Win9xDesktopProc, GetMyInstanceHandle( ), 0 ); + } + + + if( !g_hook ) + return GetLastError( ); + else + { + WriteIntSetting( "res_x86", "address", (DWORD)g_hook ); + WriteIntSetting( "res_x86", "installed", 1 ); + + SendMessage ( __GetDesktopListView( ), WM_USER+10, 0, 0 ); + } + + return 0; +} + + + + + +RES_x86API DWORD WINAPI StopHookThreadProc( void ) +{ + Init( ); + + SendMessage( __GetDesktopListView( ), WM_USER+20, 0, 0 ); + + + + if( !UnhookWindowsHookEx( g_hook ) ) + return GetLastError( ); + else + { + WriteIntSetting( "res_x86", "address", (DWORD)0 ); + WriteIntSetting( "res_x86", "installed", 0 ); + g_hook = NULL; + } + + return 0; +} \ No newline at end of file diff --git a/7/res_x86/res_x86.def b/App/res_x86/res_x86.def old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/res_x86.def rename to App/res_x86/res_x86.def diff --git a/App/res_x86/res_x86.dep b/App/res_x86/res_x86.dep new file mode 100755 index 0000000..d0ce8e3 --- /dev/null +++ b/App/res_x86/res_x86.dep @@ -0,0 +1,17 @@ +# Microsoft Developer Studio Generated Dependency File, included by res_x86.mak + +.\CfgFuncs.cpp : \ + ".\CfgFuncs.h"\ + ".\res_x86.h"\ + + +.\res_x86.cpp : \ + "..\getwnd.h"\ + ".\CfgFuncs.h"\ + ".\res_x86.h"\ + + +.\StdAfx.cpp : \ + "..\..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ + ".\StdAfx.h"\ + diff --git a/App/res_x86/res_x86.dsp b/App/res_x86/res_x86.dsp new file mode 100755 index 0000000..734604f --- /dev/null +++ b/App/res_x86/res_x86.dsp @@ -0,0 +1,140 @@ +# Microsoft Developer Studio Project File - Name="res_x86" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=res_x86 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "res_x86.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "res_x86.mak" CFG="res_x86 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "res_x86 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "res_x86 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "res_x86 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "RES_X86_EXPORTS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "RES_X86_EXPORTS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../Bin/res_x86.dll" + +!ELSEIF "$(CFG)" == "res_x86 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "RES_X86_EXPORTS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "RES_X86_EXPORTS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"../Debug/res_x86.dll" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "res_x86 - Win32 Release" +# Name "res_x86 - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\CfgFuncs.cpp +# End Source File +# Begin Source File + +SOURCE=.\res_x86.cpp +# End Source File +# Begin Source File + +SOURCE=.\res_x86.def +# End Source File +# Begin Source File + +SOURCE=.\resource.rc +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\CfgFuncs.h +# End Source File +# Begin Source File + +SOURCE=.\res_x86.h +# End Source File +# Begin Source File + +SOURCE=.\resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/7/res_x86/res_x86.exp b/App/res_x86/res_x86.exp old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/res_x86.exp rename to App/res_x86/res_x86.exp diff --git a/App/res_x86/res_x86.h b/App/res_x86/res_x86.h new file mode 100755 index 0000000..6353db4 --- /dev/null +++ b/App/res_x86/res_x86.h @@ -0,0 +1,15 @@ +/////////////////////////////////////////////////////////////////////////////// +//// res_x86.h +// + +#ifndef __RES_X86_H___ +#define __RES_X86_H___ + +#ifdef RES_X86_EXPORTS +#define RES_x86API __declspec(dllexport) +#else +#define RES_x86API __declspec(dllimport) +#endif + + +#endif //__RES_X86_H___ \ No newline at end of file diff --git a/App/res_x86/res_x86.mak b/App/res_x86/res_x86.mak new file mode 100755 index 0000000..63061d5 --- /dev/null +++ b/App/res_x86/res_x86.mak @@ -0,0 +1,208 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on res_x86.dsp +!IF "$(CFG)" == "" +CFG=res_x86 - Win32 Debug +!MESSAGE No configuration specified. Defaulting to res_x86 - Win32 Debug. +!ENDIF + +!IF "$(CFG)" != "res_x86 - Win32 Release" && "$(CFG)" != "res_x86 - Win32 Debug" +!MESSAGE Invalid configuration "$(CFG)" specified. +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "res_x86.mak" CFG="res_x86 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "res_x86 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "res_x86 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "res_x86 - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release + +ALL : "..\Bin\res_x86.dll" + + +CLEAN : + -@erase "$(INTDIR)\CfgFuncs.obj" + -@erase "$(INTDIR)\res_x86.obj" + -@erase "$(INTDIR)\res_x86.pch" + -@erase "$(INTDIR)\resource.res" + -@erase "$(INTDIR)\StdAfx.obj" + -@erase "$(INTDIR)\vc60.idb" + -@erase "$(OUTDIR)\res_x86.exp" + -@erase "$(OUTDIR)\res_x86.lib" + -@erase "..\Bin\res_x86.dll" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP_PROJ=/nologo /G6 /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "RES_X86_EXPORTS" /Fp"$(INTDIR)\res_x86.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\resource.res" /d "NDEBUG" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\res_x86.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\res_x86.pdb" /machine:I386 /def:".\res_x86.def" /out:"../Bin/res_x86.dll" /implib:"$(OUTDIR)\res_x86.lib" +DEF_FILE= \ + ".\res_x86.def" +LINK32_OBJS= \ + "$(INTDIR)\CfgFuncs.obj" \ + "$(INTDIR)\res_x86.obj" \ + "$(INTDIR)\StdAfx.obj" \ + "$(INTDIR)\resource.res" + +"..\Bin\res_x86.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ELSEIF "$(CFG)" == "res_x86 - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug + +ALL : "..\Debug\res_x86.dll" + + +CLEAN : + -@erase "$(INTDIR)\CfgFuncs.obj" + -@erase "$(INTDIR)\res_x86.obj" + -@erase "$(INTDIR)\res_x86.pch" + -@erase "$(INTDIR)\resource.res" + -@erase "$(INTDIR)\StdAfx.obj" + -@erase "$(INTDIR)\vc60.idb" + -@erase "$(INTDIR)\vc60.pdb" + -@erase "$(OUTDIR)\res_x86.exp" + -@erase "$(OUTDIR)\res_x86.lib" + -@erase "$(OUTDIR)\res_x86.pdb" + -@erase "..\Debug\res_x86.dll" + -@erase "..\Debug\res_x86.ilk" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "RES_X86_EXPORTS" /Fp"$(INTDIR)\res_x86.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\resource.res" /d "_DEBUG" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\res_x86.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\res_x86.pdb" /debug /machine:I386 /def:".\res_x86.def" /out:"../Debug/res_x86.dll" /implib:"$(OUTDIR)\res_x86.lib" /pdbtype:sept +DEF_FILE= \ + ".\res_x86.def" +LINK32_OBJS= \ + "$(INTDIR)\CfgFuncs.obj" \ + "$(INTDIR)\res_x86.obj" \ + "$(INTDIR)\StdAfx.obj" \ + "$(INTDIR)\resource.res" + +"..\Debug\res_x86.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ENDIF + +.c{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("res_x86.dep") +!INCLUDE "res_x86.dep" +!ELSE +!MESSAGE Warning: cannot find "res_x86.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "res_x86 - Win32 Release" || "$(CFG)" == "res_x86 - Win32 Debug" +SOURCE=.\CfgFuncs.cpp + +"$(INTDIR)\CfgFuncs.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\res_x86.pch" + + +SOURCE=.\res_x86.cpp + +"$(INTDIR)\res_x86.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\res_x86.pch" + + +SOURCE=.\resource.rc + +"$(INTDIR)\resource.res" : $(SOURCE) "$(INTDIR)" + $(RSC) $(RSC_PROJ) $(SOURCE) + + +SOURCE=.\StdAfx.cpp + +!IF "$(CFG)" == "res_x86 - Win32 Release" + +CPP_SWITCHES=/nologo /G6 /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "RES_X86_EXPORTS" /Fp"$(INTDIR)\res_x86.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c + +"$(INTDIR)\StdAfx.obj" "$(INTDIR)\res_x86.pch" : $(SOURCE) "$(INTDIR)" + $(CPP) @<< + $(CPP_SWITCHES) $(SOURCE) +<< + + +!ELSEIF "$(CFG)" == "res_x86 - Win32 Debug" + +CPP_SWITCHES=/nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "RES_X86_EXPORTS" /Fp"$(INTDIR)\res_x86.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c + +"$(INTDIR)\StdAfx.obj" "$(INTDIR)\res_x86.pch" : $(SOURCE) "$(INTDIR)" + $(CPP) @<< + $(CPP_SWITCHES) $(SOURCE) +<< + + +!ENDIF + + +!ENDIF + diff --git a/App/res_x86/res_x86.plg b/App/res_x86/res_x86.plg new file mode 100755 index 0000000..d35aa26 --- /dev/null +++ b/App/res_x86/res_x86.plg @@ -0,0 +1,36 @@ + + +
+

Build Log

+

+--------------------Configuration: res_x86 - Win32 Release-------------------- +

+

Command Lines

+Creating temporary file "C:\DOCUME~1\Jonathan\LOCALS~1\Temp\RSP13F.tmp" with contents +[ +/nologo /G6 /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "RES_X86_EXPORTS" /Fp"Release/res_x86.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c +"C:\Documents and Settings\Jonathan\My Documents\My Projects\Simply Transparent 7.0\res_x86\res_x86.cpp" +] +Creating command line "cl.exe @C:\DOCUME~1\Jonathan\LOCALS~1\Temp\RSP13F.tmp" +Creating temporary file "C:\DOCUME~1\Jonathan\LOCALS~1\Temp\RSP140.tmp" with contents +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"Release/res_x86.pdb" /machine:I386 /def:".\res_x86.def" /out:"../Bin/res_x86.dll" /implib:"Release/res_x86.lib" +".\Release\CfgFuncs.obj" +".\Release\res_x86.obj" +".\Release\StdAfx.obj" +".\Release\resource.res" +] +Creating command line "link.exe @C:\DOCUME~1\Jonathan\LOCALS~1\Temp\RSP140.tmp" +

Output Window

+Compiling... +res_x86.cpp +Linking... + Creating library Release/res_x86.lib and object Release/res_x86.exp + + + +

Results

+res_x86.dll - 0 error(s), 0 warning(s) +
+ + diff --git a/7/res_x86/res_x86.vcproj b/App/res_x86/res_x86.vcproj old mode 100644 new mode 100755 similarity index 100% rename from 7/res_x86/res_x86.vcproj rename to App/res_x86/res_x86.vcproj diff --git a/App/res_x86/res_x86.vcproj.old b/App/res_x86/res_x86.vcproj.old new file mode 100755 index 0000000..c257978 --- /dev/null +++ b/App/res_x86/res_x86.vcproj.old @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/App/res_x86/resource.aps b/App/res_x86/resource.aps new file mode 100755 index 0000000..4b4e2a8 Binary files /dev/null and b/App/res_x86/resource.aps differ diff --git a/App/res_x86/resource.h b/App/res_x86/resource.h new file mode 100755 index 0000000..5e04cfd --- /dev/null +++ b/App/res_x86/resource.h @@ -0,0 +1,18 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by resource.rc +// +#define IDS_APP_TITLE 103 +#define IDS_REGISTRY_KEY 104 +#define IDS_APP_CLASS 108 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 103 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/App/res_x86/resource.rc b/App/res_x86/resource.rc new file mode 100755 index 0000000..c9854e4 --- /dev/null +++ b/App/res_x86/resource.rc @@ -0,0 +1,119 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,20 + PRODUCTVERSION 7,1,0,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x29L +#else + FILEFLAGS 0x28L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Simply Transparent Desktop Enhancement" + VALUE "CompanyName", "JonathanGrimes" + VALUE "FileDescription", "Simply Transparent Desktop Enhancement" + VALUE "FileVersion", "1, 0, 0, 20" + VALUE "InternalName", "Simply Transparent" + VALUE "LegalCopyright", "Copyright ©2002" + VALUE "LegalTrademarks", "Simply Transparent© 2002 Jonthan Grimes GJ Logo®© Jonathan Grimes 2002" + VALUE "OriginalFilename", "SimplyTransparent.exe" + VALUE "PrivateBuild", "96" + VALUE "ProductName", "Simply Transparent" + VALUE "ProductVersion", "7, 1, 0, 0" + VALUE "SpecialBuild", "0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_APP_TITLE "Simply Transparent" + IDS_REGISTRY_KEY "JonathanGrimes" + IDS_APP_CLASS "SimplyTransparent.exe_JonathanG" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/App/resource.h b/App/resource.h new file mode 100755 index 0000000..c8725b7 --- /dev/null +++ b/App/resource.h @@ -0,0 +1,97 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by SimplyTransparent.rc +// +#define IDS_ABOUT 101 +#define IDS_STARTUPW 102 +#define IDD_ABOUTBOX 103 +#define IDS_APP_TITLE 103 +#define IDM_ABOUT 104 +#define IDS_REGISTRY_KEY 104 +#define IDM_EXIT 105 +#define IDS_NEWUSERW 105 +#define IDS_HELLO 106 +#define IDS_EXITW 106 +#define IDI_SIMPLYTRANSPARENT 107 +#define IDS_QUITNOW 107 +#define IDS_APP_CLASS 108 +#define IDC_SIMPLYTRANSPARENT 109 +#define IDS_PAYPAL 110 +#define IDS_WELCOME 111 +#define IDS_WARN_NEWERWINDOWS 112 +#define IDS_TRAY_AWARNESS 113 +#define IDS_WAITING 114 +#define IDD_SPLASH 129 +#define ID_TRAY 130 +#define IDB_PAYPAL 130 +#define IDB_SPLASH 131 +#define IDS_FirstRun_SELECTCOLOR 131 +#define IDS_FirstRun_HELP_END 132 +#define IDB_BITMAP1 132 +#define IDD_METHOD 133 +#define IDS_FirstRun_HELP 133 +#define IDS_ERROR_ACTIVE_DESKTOP_ENABLED 134 +#define IDB_BITMAP2 134 +#define IDD_TRAYICON_AWARENESS 135 +#define IDB_ABOUT 138 +#define IDB_TRAY 140 +#define IDD_OPTIONS 147 +#define IDD_HI_ADVANCED 149 +#define IDD_BUTTON 150 +#define IDD_MESSAGE 153 +#define IDI_ARROW 154 +#define IDB_BUTTON2 155 +#define IDB_BUTTON 155 +#define IDC_LOCKMETHOD 1000 +#define IDC_METHOD 1001 +#define IDC_METHOD2 1002 +#define IDC_SHOWICON 1003 +#define IDC_LOGGING 1004 +#define IDC_TIMEOUT 1005 +#define IDC_VISITME 1005 +#define IDC_PAYPAL_DONTATE 1006 +#define IDC_IMAGE 1007 +#define IDC_PAY 1007 +#define IDC_PRODUCTHOME 1009 +#define IDC_TEXTCOLOR 1010 +#define IDC_HELPME 1010 +#define IDC_HOT_TRACKING 1012 +#define IDC_TRAYMESSAGE 1012 +#define IDC_TRACKMETHOD 1013 +#define IDC_TRACKMETHOD2 1014 +#define IDC_TRACKMETHOD3 1015 +#define IDC_HOVER_TIME 1016 +#define IDC_ICON_HIDE 1017 +#define ID_ICONHIDE_ADVANCE 1018 +#define IDC_ICON_HIDE_METHOD 1019 +#define IDC_ICON_HIDE_METHOD2 1020 +#define IDC_ICON_HIDE_METHOD3 1021 +#define IDC_RESPONSIVE 1022 +#define IDC_SHOWBUTTON 1024 +#define IDC_CONTACTME 1025 +#define IDC_STRICT_AD_CHECKING 1027 +#define ID_ADPOLL 1027 +#define IDC_EDIT1 1036 +#define IDC_METHODMESSAGE 1037 +#define ID_FILE_BYJONATHANGRIMES 32773 +#define ID_SET_TEXT_COLOR 32781 +#define ID_STARTUP 32782 +#define ID_SHOWSPLASH 32785 +#define ID_UPDATE 32789 +#define ID_BEGINNERMODE 32790 +#define ID_OPTIONS 32791 +#define IDS_UPDATE 57345 +#define IDS_ACTIVEDESKTOP_WARN 57346 +#define ID_HELP 0xE146 +#define IDC_STATIC -1 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 141 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1013 +#define _APS_NEXT_SYMED_VALUE 110 +#endif +#endif diff --git a/App/tool_x86/ReadMe.txt b/App/tool_x86/ReadMe.txt new file mode 100755 index 0000000..cdcf5f4 --- /dev/null +++ b/App/tool_x86/ReadMe.txt @@ -0,0 +1,37 @@ +======================================================================== + DYNAMIC LINK LIBRARY : tool_x86 +======================================================================== + + +AppWizard has created this tool_x86 DLL for you. + +This file contains a summary of what you will find in each of the files that +make up your tool_x86 application. + +tool_x86.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +tool_x86.cpp + This is the main DLL source file. + +tool_x86.h + This file contains your DLL exports. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named tool_x86.pch and a precompiled types file named StdAfx.obj. + + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" to indicate parts of the source code you +should add to or customize. + + +///////////////////////////////////////////////////////////////////////////// diff --git a/App/tool_x86/StdAfx.cpp b/App/tool_x86/StdAfx.cpp new file mode 100755 index 0000000..6c48519 --- /dev/null +++ b/App/tool_x86/StdAfx.cpp @@ -0,0 +1,106 @@ +// stdafx.cpp +#include "stdafx.h" + + +void ErrorMessage( DWORD error ) +{ + LPVOID lpMsgBuf; + + FormatMessage( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + error, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language + (LPTSTR) &lpMsgBuf, + 0, + NULL + ); + + MessageBox( 0, (char *)(LPCTSTR)lpMsgBuf, "tool error", MB_OK ); + + LocalFree( lpMsgBuf ); +} + + +int str_find( string str, const char *c, int start ) +{ + int length = str.length( ); + if ( start > length) + return -1; + + char *res = strstr( str.c_str( ) + start, c); + + + return ( res == NULL ) ? -1 : (int)( res - str.c_str( ) ); +} + +int str_reversefind( string str, const char c ) +{ + char *res = strrchr( str.c_str( ), c ); + + return (res == NULL) ? -1 : (int)(res - str.c_str( ) ); +} + +string str_mid( string str, int first, int count ) +{ + if (first < 0) first = 0; + + if ( unsigned( first + count ) > str.length( ) || (count < 0) ) + count = str.length( ) - first; + + if ( unsigned( first ) > str.length( ) ) + count = 0; + + ASSERT( first >= 0 ); + ASSERT( unsigned( first + count ) <= str.length( ) ); + + int size = count; + + char *dest = new char[size+1]; + memset( dest, '\0', size+1 ); + memcpy(dest, str.c_str( )+first, size ); + + string temp; + temp = dest; + delete dest; + + return temp; +} + +string str_right( string str, int start ) +{ + if ( start < 0 ) start = 0; + if ( unsigned(start) >= str.length( ) ) + start = str.length( ); + + int size = str.length( ) - start; + + char *dest = new char[size+1]; + memset( dest, '\0', size+1 ); + memcpy( dest, str.c_str( )+start, size ); + + string temp; + temp = dest; + delete dest; + + return temp; +} + +string str_left( string str, int end ) +{ + if ( end < 0 ) end = 0; + if ( unsigned(end) >= str.length( ) ) + end = str.length( ); + + char *dest = new char[end+1]; + memset( dest, '\0', end+1 ); + memcpy( dest, str.c_str( ), end ); + + string temp; + temp = dest; + delete dest; + + return temp; +} \ No newline at end of file diff --git a/App/tool_x86/StdAfx.h b/App/tool_x86/StdAfx.h new file mode 100755 index 0000000..af18e34 --- /dev/null +++ b/App/tool_x86/StdAfx.h @@ -0,0 +1,42 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__B430EE75_98B4_4FF6_8610_BD93C97ECC2F__INCLUDED_) +#define AFX_STDAFX_H__B430EE75_98B4_4FF6_8610_BD93C97ECC2F__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +// Insert your headers here +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + +#include +#include +#include +using namespace std; + +#ifdef _DEBUG////////////////////////////////////////////////////////////////// +#include +#define ASSERT(b) _ASSERTE(b) +#else////////////////////////////////////////////////////////////////////////// +#define ASSERT(b) ( b ) +#endif///////////////////////////////////////////////////////////////////////// + +void ErrorMessage( DWORD error ); + +int str_find( string str, const char *c, int start ); +int str_reversefind( string str, const char c ); +string str_mid( string str, int first, int count = -1 ); +string str_right( string str, int start ); +string str_left( string str, int end ); + +// TODO: reference additional headers your program requires here + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__B430EE75_98B4_4FF6_8610_BD93C97ECC2F__INCLUDED_) diff --git a/App/tool_x86/tool_x86.cpp b/App/tool_x86/tool_x86.cpp new file mode 100755 index 0000000..a4935a0 --- /dev/null +++ b/App/tool_x86/tool_x86.cpp @@ -0,0 +1,140 @@ +// tool_x86.cpp : Defines the entry point for the DLL application. +// + +#include "stdafx.h" +#include "tool_x86.h" +#include +using namespace std; + + +BOOL APIENTRY DllMain( HANDLE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + + + + + + +/*///////////////////////////////////////////////////////////////////////////// +///// Update( ) +// + make sure app_url is allocated and big enough! +*/ +TOOL_X86_API BOOL Update( int major, int minor, char *app_url ) +{ + int new_major, new_minor; + BOOL ret = false; + DWORD bytes_read; + string filedata[2]; + + const DWORD buffer_size = 65535; + LPSTR buffer = new char[buffer_size]; + + string url[2] = + { + "http://www.jonathangrimes.com/versions.php?productID=SimplyTransparent", + "http://www.jonathangrimes.com/versions.php?productID=SimplyTransparent&url=true" + }; + + HINTERNET file_session, inet_session = + InternetOpen( "JonathanGrimes: Simply Transparent Tool_x86", + INTERNET_OPEN_TYPE_PRECONFIG, 0, 0, 0 ); + + if( inet_session ) + { + for(int i=0; i<2; i++) + { + file_session = + InternetOpenUrl( inet_session, url[i].c_str( ), NULL, 0, 0, 0 ); + + + if( file_session ) + { + bytes_read = 1; + + while( bytes_read > 0 ) + { + bytes_read = 0; + memset( buffer, 0, (buffer_size*sizeof(char)) ); + + if( !InternetReadFile( file_session, buffer, buffer_size, &bytes_read ) ) + ErrorMessage( GetLastError( ) ); + else + { + if( bytes_read != 0 ) + filedata[i] += buffer; + } + } + + + InternetCloseHandle( file_session ); + + } + else + { + MessageBox( 0, "Could not connect to the server", "SimplyTransparent : Tool_x86", 0 ); + break; + } + } + + InternetCloseHandle( inet_session ); + + } + else + { + MessageBox( 0, "Could not open an Internet session", "SimplyTransparent : Tool_x86", 0 ); + } + + delete buffer; + +/////////////////////////////////////////////////////////////////// + //Do parsing here...or outsource to function + + + if(!filedata[0].empty()) + { + int dot = str_find( filedata[0], ".", 0); + if( dot > -1) + { + string t = str_left( filedata[0], dot ); + new_major = atoi( t.c_str( ) ); + + t = str_right( filedata[0], dot+1 ); + new_minor = atoi( t.c_str( ) ); + + } + else + { + new_major = atoi( filedata[0].c_str( ) ); + new_minor = 0; + } + + if( new_major > major ) ret = true; + else if( new_major == major && new_minor > minor ) ret = true; + + } + + if(!filedata[1].empty() && ret && app_url) + { + if(strlen( app_url ) >= filedata[1].length( ) ) + sprintf( app_url,"%s", filedata[1].c_str( ) ); + + } + +/////////////////////////////////////////////////////////////////// + + return ret; +} diff --git a/App/tool_x86/tool_x86.def b/App/tool_x86/tool_x86.def new file mode 100755 index 0000000..271261d --- /dev/null +++ b/App/tool_x86/tool_x86.def @@ -0,0 +1,6 @@ +; tool_x86.def : Declares the module parameters for the DLL. + +LIBRARY "tool_x86" + +EXPORTS +Update \ No newline at end of file diff --git a/App/tool_x86/tool_x86.dep b/App/tool_x86/tool_x86.dep new file mode 100755 index 0000000..9334a16 --- /dev/null +++ b/App/tool_x86/tool_x86.dep @@ -0,0 +1,10 @@ +# Microsoft Developer Studio Generated Dependency File, included by tool_x86.mak + +.\StdAfx.cpp : \ + ".\StdAfx.h"\ + + +.\tool_x86.cpp : \ + ".\StdAfx.h"\ + ".\tool_x86.h"\ + diff --git a/App/tool_x86/tool_x86.dsp b/App/tool_x86/tool_x86.dsp new file mode 100755 index 0000000..0c2ec98 --- /dev/null +++ b/App/tool_x86/tool_x86.dsp @@ -0,0 +1,124 @@ +# Microsoft Developer Studio Project File - Name="tool_x86" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=tool_x86 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tool_x86.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tool_x86.mak" CFG="tool_x86 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tool_x86 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "tool_x86 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tool_x86 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TOOL_X86_EXPORTS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TOOL_X86_EXPORTS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wininet.lib /nologo /dll /machine:I386 /out:"../Bin/tool_x86.dll" + +!ELSEIF "$(CFG)" == "tool_x86 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TOOL_X86_EXPORTS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TOOL_X86_EXPORTS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wininet.lib /nologo /dll /debug /machine:I386 /out:"../Debug/tool_x86.dll" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "tool_x86 - Win32 Release" +# Name "tool_x86 - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\tool_x86.cpp +# End Source File +# Begin Source File + +SOURCE=.\tool_x86.def +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\tool_x86.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/App/tool_x86/tool_x86.h b/App/tool_x86/tool_x86.h new file mode 100755 index 0000000..b8aa60f --- /dev/null +++ b/App/tool_x86/tool_x86.h @@ -0,0 +1,16 @@ + +#ifndef TOOL_X86_H__________ +#define TOOL_X86_H__________ + + +#ifdef TOOL_X86_EXPORTS +#define TOOL_X86_API __declspec(dllexport) +#else +#define TOOL_X86_API __declspec(dllimport) +#endif + + + + + +#endif \ No newline at end of file diff --git a/App/tool_x86/tool_x86.mak b/App/tool_x86/tool_x86.mak new file mode 100755 index 0000000..59a0dff --- /dev/null +++ b/App/tool_x86/tool_x86.mak @@ -0,0 +1,187 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on tool_x86.dsp +!IF "$(CFG)" == "" +CFG=tool_x86 - Win32 Debug +!MESSAGE No configuration specified. Defaulting to tool_x86 - Win32 Debug. +!ENDIF + +!IF "$(CFG)" != "tool_x86 - Win32 Release" && "$(CFG)" != "tool_x86 - Win32 Debug" +!MESSAGE Invalid configuration "$(CFG)" specified. +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tool_x86.mak" CFG="tool_x86 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tool_x86 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "tool_x86 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tool_x86 - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release + +ALL : "..\Bin\tool_x86.dll" + + +CLEAN : + -@erase "$(INTDIR)\StdAfx.obj" + -@erase "$(INTDIR)\tool_x86.obj" + -@erase "$(INTDIR)\tool_x86.pch" + -@erase "$(INTDIR)\vc60.idb" + -@erase "$(OUTDIR)\tool_x86.exp" + -@erase "$(OUTDIR)\tool_x86.lib" + -@erase "..\Bin\tool_x86.dll" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP_PROJ=/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TOOL_X86_EXPORTS" /Fp"$(INTDIR)\tool_x86.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\tool_x86.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wininet.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\tool_x86.pdb" /machine:I386 /def:".\tool_x86.def" /out:"../Bin/tool_x86.dll" /implib:"$(OUTDIR)\tool_x86.lib" +DEF_FILE= \ + ".\tool_x86.def" +LINK32_OBJS= \ + "$(INTDIR)\StdAfx.obj" \ + "$(INTDIR)\tool_x86.obj" + +"..\Bin\tool_x86.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ELSEIF "$(CFG)" == "tool_x86 - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug + +ALL : "..\Debug\tool_x86.dll" + + +CLEAN : + -@erase "$(INTDIR)\StdAfx.obj" + -@erase "$(INTDIR)\tool_x86.obj" + -@erase "$(INTDIR)\tool_x86.pch" + -@erase "$(INTDIR)\vc60.idb" + -@erase "$(INTDIR)\vc60.pdb" + -@erase "$(OUTDIR)\tool_x86.exp" + -@erase "$(OUTDIR)\tool_x86.lib" + -@erase "$(OUTDIR)\tool_x86.pdb" + -@erase "..\Debug\tool_x86.dll" + -@erase "..\Debug\tool_x86.ilk" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TOOL_X86_EXPORTS" /Fp"$(INTDIR)\tool_x86.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\tool_x86.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wininet.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\tool_x86.pdb" /debug /machine:I386 /def:".\tool_x86.def" /out:"../Debug/tool_x86.dll" /implib:"$(OUTDIR)\tool_x86.lib" /pdbtype:sept +DEF_FILE= \ + ".\tool_x86.def" +LINK32_OBJS= \ + "$(INTDIR)\StdAfx.obj" \ + "$(INTDIR)\tool_x86.obj" + +"..\Debug\tool_x86.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ENDIF + +.c{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("tool_x86.dep") +!INCLUDE "tool_x86.dep" +!ELSE +!MESSAGE Warning: cannot find "tool_x86.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "tool_x86 - Win32 Release" || "$(CFG)" == "tool_x86 - Win32 Debug" +SOURCE=.\StdAfx.cpp + +!IF "$(CFG)" == "tool_x86 - Win32 Release" + +CPP_SWITCHES=/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TOOL_X86_EXPORTS" /Fp"$(INTDIR)\tool_x86.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c + +"$(INTDIR)\StdAfx.obj" "$(INTDIR)\tool_x86.pch" : $(SOURCE) "$(INTDIR)" + $(CPP) @<< + $(CPP_SWITCHES) $(SOURCE) +<< + + +!ELSEIF "$(CFG)" == "tool_x86 - Win32 Debug" + +CPP_SWITCHES=/nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TOOL_X86_EXPORTS" /Fp"$(INTDIR)\tool_x86.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c + +"$(INTDIR)\StdAfx.obj" "$(INTDIR)\tool_x86.pch" : $(SOURCE) "$(INTDIR)" + $(CPP) @<< + $(CPP_SWITCHES) $(SOURCE) +<< + + +!ENDIF + +SOURCE=.\tool_x86.cpp + +"$(INTDIR)\tool_x86.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\tool_x86.pch" + + + +!ENDIF + diff --git a/App/tool_x86/tool_x86.plg b/App/tool_x86/tool_x86.plg new file mode 100755 index 0000000..eb3c421 --- /dev/null +++ b/App/tool_x86/tool_x86.plg @@ -0,0 +1,26 @@ + + +
+

Build Log

+

+--------------------Configuration: tool_x86 - Win32 Release-------------------- +

+

Command Lines

+Creating temporary file "C:\DOCUME~1\Jonathan\LOCALS~1\Temp\RSP137.tmp" with contents +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wininet.lib /nologo /dll /incremental:no /pdb:"Release/tool_x86.pdb" /machine:I386 /def:".\tool_x86.def" /out:"../Bin/tool_x86.dll" /implib:"Release/tool_x86.lib" +".\Release\StdAfx.obj" +".\Release\tool_x86.obj" +] +Creating command line "link.exe @C:\DOCUME~1\Jonathan\LOCALS~1\Temp\RSP137.tmp" +

Output Window

+Linking... + Creating library Release/tool_x86.lib and object Release/tool_x86.exp + + + +

Results

+tool_x86.dll - 0 error(s), 0 warning(s) +
+ + diff --git a/7/tool_x86/tool_x86.vcproj b/App/tool_x86/tool_x86.vcproj old mode 100644 new mode 100755 similarity index 100% rename from 7/tool_x86/tool_x86.vcproj rename to App/tool_x86/tool_x86.vcproj diff --git a/App/tool_x86/tool_x86.vcproj.old b/App/tool_x86/tool_x86.vcproj.old new file mode 100755 index 0000000..2ec4dba --- /dev/null +++ b/App/tool_x86/tool_x86.vcproj.old @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/App/trayicon.cpp b/App/trayicon.cpp new file mode 100755 index 0000000..b4499a6 --- /dev/null +++ b/App/trayicon.cpp @@ -0,0 +1,248 @@ +//////////////////////////////////////////////////////////////// +// CTrayIcon + +#include "stdafx.h" +#include "trayicon.h" + + + + +/////////////////////////////////////////////////////////////////////////////// +//// Construct +// +CTrayIcon::CTrayIcon() +{ + +} + + + +/////////////////////////////////////////////////////////////////////////////// +//// Destruct +// +CTrayIcon::~CTrayIcon( ) +{ + UINT count = GetMenuItemCount( m_hMenu ); + for( UINT x = 0; x>count; x++ ) + { + MENUITEMINFO info; + GetMenuItemInfo( m_hMenu, x, true, &info ); + if(info.hbmpChecked != NULL) + DeleteObject(info.hbmpChecked); + if(info.hbmpUnchecked != NULL) + DeleteObject(info.hbmpUnchecked); + } + + SetIcon( 0 ); // remove icon from system tray +} + + + + +/////////////////////////////////////////////////////////////////////////////// +//// Init +// +void CTrayIcon::InitTrayIcon( HINSTANCE hinst, UINT uID ) +{ + // Initialize NOTIFYICONDATA + memset( &m_nid, 0 , sizeof( m_nid ) ); + m_nid.cbSize = sizeof( m_nid ); + m_nid.uID = uID;// never changes after construction + + ASSERT( hinst != NULL ); + m_hinst = hinst; + + // Use resource string as tip if there is one + LoadString( m_hinst, uID, m_nid.szTip, sizeof( m_nid.szTip ) ); + + m_nDefMenuItem = 0; +} + + + +/////////////////////////////////////////////////////////////////////////////// +//// Set notification window +// +void CTrayIcon::SetNotificationWnd(HWND hNotifyWnd, UINT uCbMsg) +{ + // If the following assert fails, you're probably + // calling me before you created your window. Oops. + ASSERT( hNotifyWnd==NULL || ::IsWindow( hNotifyWnd ) ); + m_nid.hWnd = hNotifyWnd; + + ASSERT( uCbMsg==0 || uCbMsg>=WM_USER ); + m_nid.uCallbackMessage = uCbMsg; + + m_hMenu = LoadMenu( m_hinst, MAKEINTRESOURCE( m_nid.uID ) ); + ASSERT( m_hMenu ); + if ( !m_hMenu ) + __Message( "Menu Faild to load" ); + + +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// Main Method for adding icon +// +BOOL CTrayIcon::SetIcon(UINT uID) +{ + HICON hicon = NULL; + if ( uID ) + { + LoadString( m_hinst, uID, m_nid.szTip, sizeof( m_nid.szTip ) ); + hicon = LoadIcon( m_hinst, MAKEINTRESOURCE( uID ) ); + } + return SetIcon( hicon, NULL ); +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// Base fucntion for all overloads +// +BOOL CTrayIcon::SetIcon(HICON hicon, LPCSTR lpTip) +{ + UINT msg; + m_nid.uFlags = 0; + + // do icon + if ( hicon ) + { + if( !m_nid.hIcon ) + __Comment( "Initializing Tray-icon..." ); + + // Add or replace icon in system tray + msg = m_nid.hIcon ? NIM_MODIFY : NIM_ADD; + m_nid.hIcon = hicon; + m_nid.uFlags |= NIF_ICON; + } + else + { // remove icon from tray + __Comment( "Removing Tray icon..." ); + if ( m_nid.hIcon==NULL ) + return TRUE; // already deleted + msg = NIM_DELETE; + } + + // Use the tip + if ( lpTip ) + strncpy( m_nid.szTip, lpTip, sizeof( m_nid.szTip ) ); + if ( m_nid.szTip[0] ) + m_nid.uFlags |= NIF_TIP; + + // Use callback + if ( m_nid.uCallbackMessage && m_nid.hWnd ) + m_nid.uFlags |= NIF_MESSAGE; + + // Go! + BOOL bRet = Shell_NotifyIcon( msg, &m_nid ); + if ( msg==NIM_DELETE || !bRet ) + { + DestroyIcon( m_nid.hIcon ); + m_nid.hIcon = NULL; // failed + } + + return bRet; +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// Event Handle +// +LRESULT CTrayIcon::OnTrayNotification( WPARAM wID, LPARAM lEvent ) +{ + if ( wID!=m_nid.uID || + ( lEvent!=WM_RBUTTONUP && lEvent!=WM_LBUTTONDBLCLK ) ) + return 0; + + HMENU pSubMenu = GetSubMenu( m_hMenu , 0 ); + ASSERT( pSubMenu ); + if ( !pSubMenu ) + return 0; + + if( m_nDefMenuItem == 0 ) + { + m_nDefMenuItem = GetMenuItemID( m_hMenu, 0 ); + } + + if ( lEvent==WM_RBUTTONUP ) + { + + // Make 'm_nDefMenuItem' menu item the default (bold font) + ASSERT( SetMenuDefaultItem( pSubMenu, m_nDefMenuItem, FALSE ) != 0 ); + + + POINT mouse; + GetCursorPos( &mouse ); + SetForegroundWindow( m_nid.hWnd ); + TrackPopupMenu( pSubMenu, 0, mouse.x, mouse.y, 0, m_nid.hWnd, NULL ); + + } + else // execute default menu item + SendMessage( m_nid.hWnd, WM_COMMAND, m_nDefMenuItem, 0 ); + + return 1; // handled +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// Adds or removes a checkmark next to the menu item +// +void CTrayIcon::CheckMenuItem( UINT nItem, BOOL bChecked ) +{ + ::CheckMenuItem( m_hMenu, nItem, bChecked ? MF_CHECKED : MF_UNCHECKED ); +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// Adds bitmaps next to the menu item +// +BOOL CTrayIcon::SetBitmaps( UINT nItem, HBITMAP bmUnChecked, HBITMAP bmChecked ) +{ + return SetMenuItemBitmaps( m_hMenu, nItem, MF_BYCOMMAND, bmUnChecked, bmChecked ); +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// Toggles between the active state and disabled state bitmaps +// +BOOL CTrayIcon::SetBitmaps(UINT nItem, UINT nUnChecked, UINT nChecked){ + + return SetBitmaps( nItem, + LoadBitmap( m_hinst, MAKEINTRESOURCE( nUnChecked ) ), + LoadBitmap( m_hinst, MAKEINTRESOURCE( nChecked ) ) ); + +} + + + + + +/////////////////////////////////////////////////////////////////////////////// +//// Set the defualt action on the menu (also bolds the item) +// +void CTrayIcon::SetDefault( UINT nItem ) +{ + m_nDefMenuItem = nItem; +} + + + diff --git a/App/trayicon.h b/App/trayicon.h new file mode 100755 index 0000000..5ec779e --- /dev/null +++ b/App/trayicon.h @@ -0,0 +1,37 @@ +//////////////////////////////////////////////////////////////// +//// CTrayIcon +// + +#ifndef _TRAYICON_H +#define _TRAYICON_H + +#include "resource.h" +#include + +class CTrayIcon +{ +protected: + HMENU m_hMenu; + NOTIFYICONDATA m_nid; + UINT m_nDefMenuItem; + HINSTANCE m_hinst; + +public: + void CTrayIcon::InitTrayIcon( HINSTANCE hinst, UINT uID = ID_TRAY ); + CTrayIcon( ); + ~CTrayIcon( ); + void SetDefault( UINT nItem ); + void CTrayIcon::CheckMenuItem( UINT nItem, BOOL bChecked ); + void SetNotificationWnd( HWND hNotifyWnd, UINT uCbMsg ); + BOOL SetIcon( UINT uID ); + BOOL SetIcon( HICON hicon, LPCSTR lpTip ); + BOOL SetIcon( LPCTSTR lpResName, LPCSTR lpTip ) + { return SetIcon(lpResName ? + LoadIcon( m_hinst, lpResName ) : NULL, lpTip ); } + BOOL SetBitmaps( UINT nItem, HBITMAP bmUnChecked, HBITMAP bmChecked ); + BOOL SetBitmaps( UINT nItem, UINT nUnChecked, UINT nChecked ); + + virtual LRESULT OnTrayNotification( WPARAM uID, LPARAM lEvent ); +}; + +#endif diff --git a/Installer/Simply Transparent 7 Installer.sln b/Installer/Simply Transparent 7 Installer.sln new file mode 100755 index 0000000..4f8e3fb --- /dev/null +++ b/Installer/Simply Transparent 7 Installer.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Simply Transparent 7 Installer", "Simply Transparent 7 Installer.vdproj", "{CEC71A6E-A1DD-4F38-A75F-358C36F4ACB8}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {CEC71A6E-A1DD-4F38-A75F-358C36F4ACB8}.Debug.ActiveCfg = Debug + {CEC71A6E-A1DD-4F38-A75F-358C36F4ACB8}.Debug.Build.0 = Debug + {CEC71A6E-A1DD-4F38-A75F-358C36F4ACB8}.Release.ActiveCfg = Release + {CEC71A6E-A1DD-4F38-A75F-358C36F4ACB8}.Release.Build.0 = Release + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/Installer/Simply Transparent 7 Installer.suo b/Installer/Simply Transparent 7 Installer.suo new file mode 100755 index 0000000..03724af Binary files /dev/null and b/Installer/Simply Transparent 7 Installer.suo differ diff --git a/Installer/Simply Transparent 7 Installer.vdproj b/Installer/Simply Transparent 7 Installer.vdproj new file mode 100755 index 0000000..d1061dc --- /dev/null +++ b/Installer/Simply Transparent 7 Installer.vdproj @@ -0,0 +1,826 @@ +"DeployProject" +{ +"VSVersion" = "3:700" +"ProjectType" = "8:{5443560c-dbb4-11d2-8724-00a0c9a8b90c}" +"IsWebType" = "8:FALSE" +"ProjectName" = "8:Simply Transparent 7 Installer" +"LanguageId" = "3:1033" +"CodePage" = "3:1252" +"UILanguageId" = "3:1033" +"SccProjectName" = "8:" +"SccLocalPath" = "8:" +"SccAuxPath" = "8:" +"SccProvider" = "8:" + "Hierarchy" + { + "Entry" + { + "MsmKey" = "8:_1D4E8CA5F74E417D97D117931F2E9484" + "OwnerKey" = "8:_UNDEFINED" + "MsmSig" = "8:C:\\DOCUMENTS AND SETTINGS\\JONATHAN\\MY DOCUMENTS\\VISUAL STUDIO PROJECTS\\SIMPLY TRANSPARENT 7\\BIN\\SIMPLYTRANSPARENT.EXE" + } + "Entry" + { + "MsmKey" = "8:_4CC144020BE74CA3A0CC011EE0273104" + "OwnerKey" = "8:_UNDEFINED" + "MsmSig" = "8:C:\\DOCUMENTS AND SETTINGS\\JONATHAN\\MY DOCUMENTS\\VISUAL STUDIO PROJECTS\\SIMPLY TRANSPARENT 7\\BIN\\TOOL_X86.DLL" + } + "Entry" + { + "MsmKey" = "8:_51B8001883344DFB8FD167CDA33BF35B" + "OwnerKey" = "8:_UNDEFINED" + "MsmSig" = "8:C:\\DOCUMENTS AND SETTINGS\\JONATHAN\\MY DOCUMENTS\\VISUAL STUDIO PROJECTS\\SIMPLY TRANSPARENT 7\\BIN\\SIMPLYTRANSPARENT.CHM" + } + "Entry" + { + "MsmKey" = "8:_600DB4BD25C9441F8A4D1D9ED41BB4BE" + "OwnerKey" = "8:_UNDEFINED" + "MsmSig" = "8:C:\\DOCUMENTS AND SETTINGS\\JONATHAN\\MY DOCUMENTS\\VISUAL STUDIO PROJECTS\\SIMPLY TRANSPARENT 7 INSTALLER\\HEAD.JPG" + } + "Entry" + { + "MsmKey" = "8:_8CA56BD8B9BE479A84E5E4A9F153091A" + "OwnerKey" = "8:_UNDEFINED" + "MsmSig" = "8:C:\\DOCUMENTS AND SETTINGS\\JONATHAN\\MY DOCUMENTS\\VISUAL STUDIO PROJECTS\\SIMPLY TRANSPARENT 7\\BIN\\RES_X86.DLL" + } + } + "Configurations" + { + "Debug" + { + "DisplayName" = "8:Debug" + "IsDebugOnly" = "11:TRUE" + "IsReleaseOnly" = "11:FALSE" + "OutputFilename" = "8:Debug\\st7.msi" + "PackageFilesAs" = "3:2" + "PackageFileSize" = "3:-2147483648" + "CabType" = "3:1" + "Compression" = "3:3" + "SignOutput" = "11:FALSE" + "CertificateFile" = "8:" + "PrivateKeyFile" = "8:" + "TimeStampServer" = "8:" + "InstallerBootstrapper" = "3:2" + } + "Release" + { + "DisplayName" = "8:Release" + "IsDebugOnly" = "11:FALSE" + "IsReleaseOnly" = "11:TRUE" + "OutputFilename" = "8:st7.msi" + "PackageFilesAs" = "3:2" + "PackageFileSize" = "3:-2147483648" + "CabType" = "3:1" + "Compression" = "3:3" + "SignOutput" = "11:FALSE" + "CertificateFile" = "8:" + "PrivateKeyFile" = "8:" + "TimeStampServer" = "8:" + "InstallerBootstrapper" = "3:1" + } + } + "Deployable" + { + "CustomAction" + { + } + "DefaultFeature" + { + "Name" = "8:DefaultFeature" + "Title" = "8:" + "Description" = "8:" + } + "Feature" + { + } + "File" + { + "{54DA9790-1474-11D3-8E00-00C04F6837D0}:_1D4E8CA5F74E417D97D117931F2E9484" + { + "SourcePath" = "8:..\\Simply Transparent 7\\Bin\\SimplyTransparent.exe" + "TargetName" = "8:SimplyTransparent.exe" + "Tag" = "8:" + "Folder" = "8:_06ACC364C1164929A826B3D9DF9BBE32" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:FALSE" + "IsolateTo" = "8:" + } + "{54DA9790-1474-11D3-8E00-00C04F6837D0}:_4CC144020BE74CA3A0CC011EE0273104" + { + "SourcePath" = "8:..\\Simply Transparent 7\\Bin\\tool_x86.dll" + "TargetName" = "8:tool_x86.dll" + "Tag" = "8:" + "Folder" = "8:_06ACC364C1164929A826B3D9DF9BBE32" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:FALSE" + "IsolateTo" = "8:" + } + "{54DA9790-1474-11D3-8E00-00C04F6837D0}:_51B8001883344DFB8FD167CDA33BF35B" + { + "SourcePath" = "8:..\\Simply Transparent 7\\Bin\\SimplyTransparent.chm" + "TargetName" = "8:SimplyTransparent.chm" + "Tag" = "8:" + "Folder" = "8:_06ACC364C1164929A826B3D9DF9BBE32" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:FALSE" + "IsolateTo" = "8:" + } + "{54DA9790-1474-11D3-8E00-00C04F6837D0}:_600DB4BD25C9441F8A4D1D9ED41BB4BE" + { + "SourcePath" = "8:head.jpg" + "TargetName" = "8:head.jpg" + "Tag" = "8:" + "Folder" = "8:_06ACC364C1164929A826B3D9DF9BBE32" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:FALSE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:TRUE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:FALSE" + "IsolateTo" = "8:" + } + "{54DA9790-1474-11D3-8E00-00C04F6837D0}:_8CA56BD8B9BE479A84E5E4A9F153091A" + { + "SourcePath" = "8:..\\Simply Transparent 7\\Bin\\res_x86.dll" + "TargetName" = "8:res_x86.dll" + "Tag" = "8:" + "Folder" = "8:_06ACC364C1164929A826B3D9DF9BBE32" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:FALSE" + "IsolateTo" = "8:" + } + } + "FileType" + { + } + "Folder" + { + "{EE62640D-12F2-11D3-8D6C-00A0C9CFCEE6}:_06ACC364C1164929A826B3D9DF9BBE32" + { + "DefaultLocation" = "8:[ProgramFilesFolder][Manufacturer]\\[ProductName]" + "Name" = "8:#1925" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:TARGETDIR" + "Folders" + { + } + } + "{777C097F-0ED8-11D3-8D6C-00A0C9CFCEE6}:_1BFA8D2C4CD9449096438F4B38A77FCB" + { + "Name" = "8:#1928" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:StartupFolder" + "Folders" + { + } + } + "{777C097F-0ED8-11D3-8D6C-00A0C9CFCEE6}:_4C33D073857647F39E5C85F931E7E77E" + { + "Name" = "8:#1919" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:ProgramMenuFolder" + "Folders" + { + "{461E96AF-1495-11D3-8D6C-00A0C9CFCEE6}:_56EF7C06DEF0495FB903D7E5E4D9892F" + { + "Name" = "8:JonathanGrimes" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:_EA6384AE10BA43B180C3C8A082B2B471" + "Folders" + { + "{461E96AF-1495-11D3-8D6C-00A0C9CFCEE6}:_ACB73A595157423198FAB8A90F48E122" + { + "Name" = "8:Simply Transparent 7" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:_3D36A67836C446ED80E63080A0485EC4" + "Folders" + { + } + } + } + } + } + } + "{777C097F-0ED8-11D3-8D6C-00A0C9CFCEE6}:_83E8436DB8304D3BB79F5E8E2C35BC6C" + { + "Name" = "8:#1910" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:CommonFilesFolder" + "Folders" + { + } + } + "{777C097F-0ED8-11D3-8D6C-00A0C9CFCEE6}:_CD55A6DA593E439282721E07AF4AA18B" + { + "Name" = "8:#1916" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:DesktopFolder" + "Folders" + { + } + } + } + "LaunchCondition" + { + } + "Locator" + { + } + "Shortcut" + { + "{D0C99CFE-1238-11D3-8E00-00C04F6837D0}:_187498963ABF4B1D8360DB377B9BFC3F" + { + "Name" = "8:Simply Transparent" + "Arguments" = "8:" + "Description" = "8:Simply Transparent" + "ShowCmd" = "3:1" + "IconIndex" = "3:130" + "Transitive" = "11:FALSE" + "Target" = "8:_1D4E8CA5F74E417D97D117931F2E9484" + "Folder" = "8:_1BFA8D2C4CD9449096438F4B38A77FCB" + "WorkingFolder" = "8:_06ACC364C1164929A826B3D9DF9BBE32" + "Icon" = "8:_1D4E8CA5F74E417D97D117931F2E9484" + "Feature" = "8:" + } + "{D0C99CFE-1238-11D3-8E00-00C04F6837D0}:_2D110A64DEF04C74B10C591A92EDF172" + { + "Name" = "8:Simply Transparent - Update" + "Arguments" = "8:/update" + "Description" = "8:Check for updates" + "ShowCmd" = "3:1" + "IconIndex" = "3:130" + "Transitive" = "11:FALSE" + "Target" = "8:_1D4E8CA5F74E417D97D117931F2E9484" + "Folder" = "8:_ACB73A595157423198FAB8A90F48E122" + "WorkingFolder" = "8:_06ACC364C1164929A826B3D9DF9BBE32" + "Icon" = "8:_1D4E8CA5F74E417D97D117931F2E9484" + "Feature" = "8:" + } + "{D0C99CFE-1238-11D3-8E00-00C04F6837D0}:_3D6BD246FC264D3A872D545166B2FE5E" + { + "Name" = "8:Run Simply Transparent" + "Arguments" = "8:" + "Description" = "8:" + "ShowCmd" = "3:1" + "IconIndex" = "3:130" + "Transitive" = "11:FALSE" + "Target" = "8:_1D4E8CA5F74E417D97D117931F2E9484" + "Folder" = "8:_ACB73A595157423198FAB8A90F48E122" + "WorkingFolder" = "8:_06ACC364C1164929A826B3D9DF9BBE32" + "Icon" = "8:_1D4E8CA5F74E417D97D117931F2E9484" + "Feature" = "8:" + } + "{D0C99CFE-1238-11D3-8E00-00C04F6837D0}:_64840A96056B428F8AC3CF5F040CBF2A" + { + "Name" = "8:Change Text Color" + "Arguments" = "8:/textcolor" + "Description" = "8:Change text color" + "ShowCmd" = "3:1" + "IconIndex" = "3:130" + "Transitive" = "11:FALSE" + "Target" = "8:_1D4E8CA5F74E417D97D117931F2E9484" + "Folder" = "8:_ACB73A595157423198FAB8A90F48E122" + "WorkingFolder" = "8:_06ACC364C1164929A826B3D9DF9BBE32" + "Icon" = "8:_1D4E8CA5F74E417D97D117931F2E9484" + "Feature" = "8:" + } + "{D0C99CFE-1238-11D3-8E00-00C04F6837D0}:_652427DB16074409BF52746639EB8A75" + { + "Name" = "8:Simply Transparent - Help" + "Arguments" = "8:" + "Description" = "8:Help" + "ShowCmd" = "3:1" + "IconIndex" = "3:130" + "Transitive" = "11:FALSE" + "Target" = "8:_51B8001883344DFB8FD167CDA33BF35B" + "Folder" = "8:_ACB73A595157423198FAB8A90F48E122" + "WorkingFolder" = "8:_06ACC364C1164929A826B3D9DF9BBE32" + "Icon" = "8:_1D4E8CA5F74E417D97D117931F2E9484" + "Feature" = "8:" + } + "{D0C99CFE-1238-11D3-8E00-00C04F6837D0}:_8925A10A2FBF4D54BF1BC585675BC0D4" + { + "Name" = "8:About Simply Transparent" + "Arguments" = "8:/about" + "Description" = "8:About" + "ShowCmd" = "3:1" + "IconIndex" = "3:130" + "Transitive" = "11:FALSE" + "Target" = "8:_1D4E8CA5F74E417D97D117931F2E9484" + "Folder" = "8:_ACB73A595157423198FAB8A90F48E122" + "WorkingFolder" = "8:_06ACC364C1164929A826B3D9DF9BBE32" + "Icon" = "8:_1D4E8CA5F74E417D97D117931F2E9484" + "Feature" = "8:" + } + "{D0C99CFE-1238-11D3-8E00-00C04F6837D0}:_8BAC9E497D3D4CF8A22B84054FF416A5" + { + "Name" = "8:Simply Transparent - Options" + "Arguments" = "8:/options" + "Description" = "8:Options" + "ShowCmd" = "3:1" + "IconIndex" = "3:130" + "Transitive" = "11:FALSE" + "Target" = "8:_1D4E8CA5F74E417D97D117931F2E9484" + "Folder" = "8:_ACB73A595157423198FAB8A90F48E122" + "WorkingFolder" = "8:_06ACC364C1164929A826B3D9DF9BBE32" + "Icon" = "8:_1D4E8CA5F74E417D97D117931F2E9484" + "Feature" = "8:" + } + } + "Sequences" + { + } + "Registry" + { + "HKLM" + { + "Keys" + { + } + } + "HKCU" + { + "Keys" + { + "{7DF0CD0A-FF27-11D2-8D6B-00A0C9CFCEE6}:_10DCBEC8DDC44FBDB7D09B3C999B7463" + { + "Name" = "8:Software" + "Condition" = "8:" + "AlwaysCreate" = "11:FALSE" + "DeleteAtUninstall" = "11:FALSE" + "Transitive" = "11:FALSE" + "Keys" + { + "{7DF0CD0A-FF27-11D2-8D6B-00A0C9CFCEE6}:_4FDFD78C255E47978922EE6C163EB32C" + { + "Name" = "8:JonathanGrimes" + "Condition" = "8:" + "AlwaysCreate" = "11:FALSE" + "DeleteAtUninstall" = "11:FALSE" + "Transitive" = "11:FALSE" + "Keys" + { + "{7DF0CD0A-FF27-11D2-8D6B-00A0C9CFCEE6}:_CA41B1C4B3754FB2A134B83B6E3880CA" + { + "Name" = "8:Simply Transparent" + "Condition" = "8:" + "AlwaysCreate" = "11:FALSE" + "DeleteAtUninstall" = "11:TRUE" + "Transitive" = "11:FALSE" + "Keys" + { + "{7DF0CD0A-FF27-11D2-8D6B-00A0C9CFCEE6}:_75AD74C4E49D4E39BA022E60EE4A8142" + { + "Name" = "8:res_x86" + "Condition" = "8:" + "AlwaysCreate" = "11:FALSE" + "DeleteAtUninstall" = "11:FALSE" + "Transitive" = "11:FALSE" + "Keys" + { + } + "Values" + { + "{B73D4F5A-FF29-11D2-8D6B-00A0C9CFCEE6}:_18B4CABCE15A4CB6B84FCEE428A6F749" + { + "Name" = "8:installed" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "ValueTypes" = "3:3" + "Value" = "3:0" + } + "{B73D4F5A-FF29-11D2-8D6B-00A0C9CFCEE6}:_44729635DF8C432F9C95A8DFBA51BEBA" + { + "Name" = "8:HoverEffect" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "ValueTypes" = "3:3" + "Value" = "3:0" + } + "{B73D4F5A-FF29-11D2-8D6B-00A0C9CFCEE6}:_53A014F310504FCF8A2D373D138A5DA3" + { + "Name" = "8:IHmethod" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "ValueTypes" = "3:3" + "Value" = "3:0" + } + "{B73D4F5A-FF29-11D2-8D6B-00A0C9CFCEE6}:_756553B698CD45D29B7A4E04AA1364DA" + { + "Name" = "8:IHvis" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "ValueTypes" = "3:3" + "Value" = "3:1" + } + "{B73D4F5A-FF29-11D2-8D6B-00A0C9CFCEE6}:_850CBD79766346539802D099AA6E997D" + { + "Name" = "8:address" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "ValueTypes" = "3:3" + "Value" = "3:0" + } + "{B73D4F5A-FF29-11D2-8D6B-00A0C9CFCEE6}:_D089786A179748E68DB3C3CA4AF2AEB9" + { + "Name" = "8:HoverTime" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "ValueTypes" = "3:3" + "Value" = "3:750" + } + "{B73D4F5A-FF29-11D2-8D6B-00A0C9CFCEE6}:_D85C3E26CE8B4C24804015B003A3756E" + { + "Name" = "8:textcolor" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "ValueTypes" = "3:1" + "Value" = "8:255,255,255" + } + "{B73D4F5A-FF29-11D2-8D6B-00A0C9CFCEE6}:_E831161CD54C40CD8E387E3D07E164F2" + { + "Name" = "8:deftxtclr" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "ValueTypes" = "3:3" + "Value" = "3:1" + } + } + } + } + "Values" + { + "{B73D4F5A-FF29-11D2-8D6B-00A0C9CFCEE6}:_031A40C46D11447684A08173B3818A26" + { + "Name" = "8:Lockmeth" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "ValueTypes" = "3:3" + "Value" = "3:1" + } + "{B73D4F5A-FF29-11D2-8D6B-00A0C9CFCEE6}:_5F949737197844FAB1F1EEC615631602" + { + "Name" = "8:FirstRun" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "ValueTypes" = "3:3" + "Value" = "3:1" + } + "{B73D4F5A-FF29-11D2-8D6B-00A0C9CFCEE6}:_6AB2298F31444A4F8494CD3927129B0E" + { + "Name" = "8:TrayIcon" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "ValueTypes" = "3:3" + "Value" = "3:1" + } + "{B73D4F5A-FF29-11D2-8D6B-00A0C9CFCEE6}:_89FEA9B5F4984D10AAA2C6362EAC16F7" + { + "Name" = "8:ADpoll" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "ValueTypes" = "3:3" + "Value" = "3:1" + } + "{B73D4F5A-FF29-11D2-8D6B-00A0C9CFCEE6}:_ADC6D0D08C0F417C830ABC29D35C13AA" + { + "Name" = "8:Splash" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "ValueTypes" = "3:3" + "Value" = "3:0" + } + "{B73D4F5A-FF29-11D2-8D6B-00A0C9CFCEE6}:_AF883B1EAF324C478B38996629F98AB0" + { + "Name" = "8:Logging" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "ValueTypes" = "3:3" + "Value" = "3:1" + } + "{B73D4F5A-FF29-11D2-8D6B-00A0C9CFCEE6}:_E3F6C8DF6A91467C9F1904A214C7C74C" + { + "Name" = "8:TrayIcon-Changed" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "ValueTypes" = "3:3" + "Value" = "3:0" + } + "{B73D4F5A-FF29-11D2-8D6B-00A0C9CFCEE6}:_FF2BEBCD6D924CB18FF54DCD11770E59" + { + "Name" = "8:LockMeth1Time" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "ValueTypes" = "3:3" + "Value" = "3:20" + } + } + } + } + "Values" + { + } + } + } + "Values" + { + } + } + } + } + "HKCR" + { + "Keys" + { + } + } + "HKU" + { + "Keys" + { + } + } + "HKPU" + { + "Keys" + { + } + } + } + "ProjectOutput" + { + } + "Product" + { + "Name" = "8:Microsoft Visual Studio" + "ProductName" = "8:Simply Transparent 7" + "ProductCode" = "8:{718D9407-5C9E-4820-AA8F-3AF7BA593C33}" + "PackageCode" = "8:{6B5E5AD0-DD09-458A-AA9C-63ADFAFC90F5}" + "UpgradeCode" = "8:{FFA1E0CC-6D8A-11D4-B831-0020781868ED}" + "RestartWWWService" = "11:FALSE" + "RemovePreviousVersions" = "11:TRUE" + "DetectNewerInstalledVersion" = "11:TRUE" + "ProductVersion" = "8:7.0.0002" + "Manufacturer" = "8:JonathanGrimes" + "ARPHELPTELEPHONE" = "8:" + "ARPHELPLINK" = "8:" + "Title" = "8:Simply Transparent 7" + "Subject" = "8:" + "ARPCONTACT" = "8:Jonathan Grimes" + "Keywords" = "8:" + "ARPCOMMENTS" = "8:" + "ARPURLINFOABOUT" = "8:www.jonathangrimes.com" + "ARPPRODUCTICON" = "8:_1D4E8CA5F74E417D97D117931F2E9484" + "ARPIconIndex" = "3:130" + "SearchPath" = "8:" + "UseSystemSearchPath" = "11:TRUE" + } + "MsiBootstrapper" + { + "LangId" = "3:1033" + } + "MergeModule" + { + } + "UserInterface" + { + "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_3DF562E4A5C74744A265BB1EB9B22B1A" + { + "Name" = "8:#1901" + "Sequence" = "3:2" + "Attributes" = "3:2" + "Dialogs" + { + } + } + "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_509707495D3240DA85188D99DFCB9EC0" + { + "Name" = "8:#1900" + "Sequence" = "3:2" + "Attributes" = "3:1" + "Dialogs" + { + } + } + "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_71D6DE3605464157989A977A61AB58FD" + { + "Name" = "8:#1902" + "Sequence" = "3:2" + "Attributes" = "3:3" + "Dialogs" + { + } + } + "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_AC77A6B189334F72A05F4110A80A92AE" + { + "Name" = "8:#1900" + "Sequence" = "3:1" + "Attributes" = "3:1" + "Dialogs" + { + "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_3DD6473B65B545D8A46AD6A99B094C6F" + { + "Sequence" = "3:200" + "DisplayName" = "8:Confirm Installation" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdConfirmDlg.wid" + "ModuleSignature" = "8:VsdDialogs.6DBC9783_3677_4D68_8BF5_D749558A0AC1" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:2" + "Value" = "8:_600DB4BD25C9441F8A4D1D9ED41BB4BE" + "UsePlugInResources" = "11:TRUE" + } + } + } + "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_73C790BD128A44E88A9218BD2F2A4691" + { + "Sequence" = "3:110" + "DisplayName" = "8:Installation Folder" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdFolderDlg.wid" + "ModuleSignature" = "8:VsdDialogs.C113BC36_2532_4D45_8099_4818B1133B2F" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:2" + "Value" = "8:_600DB4BD25C9441F8A4D1D9ED41BB4BE" + "UsePlugInResources" = "11:TRUE" + } + } + } + } + } + "{E4ECAB26-4AB7-11D3-8D78-00A0C9CFCEE6}:_B2A207B3C89C43C4912072DE9F75CC90" + { + "UseDynamicProperties" = "11:FALSE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdBasicDialogs.wim" + "ModuleSignature" = "8:VsdDialogs.CE4B864F_F1C1_4B85_98D4_2A2BF5FFB12B" + } + "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_D929088FC9004847AB9D73E1F35ECE7D" + { + "Name" = "8:#1902" + "Sequence" = "3:1" + "Attributes" = "3:3" + "Dialogs" + { + "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_C71671573D684E61BDC448AEE0B88D57" + { + "Sequence" = "3:100" + "DisplayName" = "8:Finished" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdFinishedDlg.wid" + "ModuleSignature" = "8:VsdDialogs.1DB77F5A_BA5C_4470_89B6_0B0EC07E3A10" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:2" + "Value" = "8:_600DB4BD25C9441F8A4D1D9ED41BB4BE" + "UsePlugInResources" = "11:TRUE" + } + } + } + } + } + "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_F5720FF132864E1DA6E8BFA8F521C6C0" + { + "Name" = "8:#1901" + "Sequence" = "3:1" + "Attributes" = "3:2" + "Dialogs" + { + "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_7BF67B28EDB042088A190E4358984FFB" + { + "Sequence" = "3:100" + "DisplayName" = "8:Progress" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdProgressDlg.wid" + "ModuleSignature" = "8:VsdDialogs.4FB12620_0D15_42D0_8677_2766FFA6923F" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:2" + "Value" = "8:_600DB4BD25C9441F8A4D1D9ED41BB4BE" + "UsePlugInResources" = "11:TRUE" + } + "ShowProgress" + { + "Name" = "8:ShowProgress" + "DisplayName" = "8:#1009" + "Description" = "8:#1109" + "Type" = "3:5" + "ContextData" = "8:1;True=1;False=0" + "Attributes" = "3:0" + "Setting" = "3:0" + "Value" = "3:1" + "DefaultValue" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + } + } + } + } + "{E4ECAB26-4AB7-11D3-8D78-00A0C9CFCEE6}:_FE65D690D2164634918B3B88A1A827E6" + { + "UseDynamicProperties" = "11:FALSE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdUserInterface.wim" + "ModuleSignature" = "8:VsdUserInterface.524F4245_5254_5341_4C45_534153783400" + } + } + } +} diff --git a/Installer/head.jpg b/Installer/head.jpg new file mode 100755 index 0000000..1f5c025 Binary files /dev/null and b/Installer/head.jpg differ diff --git a/Installer/st7.msi b/Installer/st7.msi new file mode 100755 index 0000000..5a8b5de Binary files /dev/null and b/Installer/st7.msi differ diff --git a/Setup/Release/InstMsiA.Exe b/Setup/Release/InstMsiA.Exe old mode 100644 new mode 100755 diff --git a/Setup/Release/InstMsiW.Exe b/Setup/Release/InstMsiW.Exe old mode 100644 new mode 100755 diff --git a/Setup/Release/Setup.Exe b/Setup/Release/Setup.Exe old mode 100644 new mode 100755 diff --git a/Setup/Release/Setup.Ini b/Setup/Release/Setup.Ini old mode 100644 new mode 100755 diff --git a/Setup/Release/Setup.msi b/Setup/Release/Setup.msi old mode 100644 new mode 100755 diff --git a/Setup/Setup.vdproj b/Setup/Setup.vdproj old mode 100644 new mode 100755 diff --git a/splash-1.png b/splash-1.png old mode 100644 new mode 100755