The MASM Forum Archive 2004 to 2012

Project Support Forums => MASM32 => Topic started by: Bill Cravener on September 25, 2011, 02:02:04 PM

Title: More fun with Windows wallpaper.
Post by: Bill Cravener on September 25, 2011, 02:02:04 PM
I was playing around with Windows Region API's last weekend seeing what I could do with mouse hit testing using regions in several app's of mine when a flash of cleverness came over me. :bg I have this really cool HAL9000 wallpaper, why not make a HAL9000 wallpaper loader that if you placed the mouse pointer over HAL's orange eye he would speak one of his famous lines from the 2001 or 2010 movies. So here is what I came up with. When you run the program it places HAL's icon in the system tray then it retrieves your current wallpaper and regkey settings before loading the HAL9000 wallpaper so when you exit the program your original wallpaper and settings are restored. Once the HAL9000 wallpaper appears HAL announces himself. Now that the program is running as long as HAL's orange eye is visible (no open app is covering his eye) you can place your mouse pointer over HAL's orange eye for just a second then pull the mouse away and he will speak his mind just once. If you leave your mouse pointer over HAL's orange eye he never stops yapping. I have only tested this program on my Vista system and it needs at least a 1024x768 resolution to work. Of course I created this little app using my 1920x1080 resolution so it will be best if your monitor can handle that. The program shows how to create a hit testing region, how to check if the hit region area is visible, how to do something if the mouse is within the hit region, how to save and load a wallpaper and regkey settings, how to center the wallpaper and how to play a wav file.

My Desktop.
(http://www.quickersoft.com/pictures/haldesktop.jpg)

http://www.quickersoft.com/examples/Hal9000.zip

Or it can be downloaded from my site link below.

Title: Re: More fun with Windows wallpaper.
Post by: fearless on September 25, 2011, 03:26:19 PM
Thats pretty cool
Title: Re: More fun with Windows wallpaper.
Post by: dedndave on September 25, 2011, 06:55:12 PM
very cool as always, Bill
i especially like the "I'm Sorry, Dave; I'm afraid I can't do that." message   :lol

what i really like about this program is that is gives example code for doing several different things   :U
Title: Re: More fun with Windows wallpaper.
Post by: Bill Cravener on September 25, 2011, 07:42:12 PM
Thanks fearless, it is fun to play with. :bg

Dave, if you played all HAL's wav files, of the 12 wav files HAL speaks, there is only one where he speaks a name (Dave). Thats because I thru that one in just for you buddy. :bg
Title: Re: More fun with Windows wallpaper.
Post by: dedndave on September 25, 2011, 07:45:32 PM
 :bdg

i can probably find all kinds of HAL 9000 "Dave" WAV files
thing is - i only have one sound for errors   :lol
Title: Re: More fun with Windows wallpaper.
Post by: Bill Cravener on September 26, 2011, 05:58:19 PM
Oops, I guess nobody noticed my mistake, something I forgot to do in the source code that must be done is remember to delete the hRegion object when it is no longer needed. Link above contains correction. :bg
Title: Re: More fun with Windows wallpaper.
Post by: dedndave on September 26, 2011, 06:46:00 PM
oh no, Mr Bill !!!!!!

(http://1.bp.blogspot.com/-LKKxDqYs4e8/TegiDh5UeyI/AAAAAAAABjk/5qFia-tCs6g/s320/A%2BSpace%2BOdyssey%2BDave.png)
Title: Re: More fun with Windows wallpaper.
Post by: Bill Cravener on September 26, 2011, 07:00:21 PM
Yep, we are getting old! I wonder how many here remember that guy? :lol

(http://www.quickersoft.com/pictures/bill.jpg)
Title: Re: More fun with Windows wallpaper.
Post by: dedndave on September 26, 2011, 08:11:48 PM
i have some of the early seasons on dvd
not as funny as they were back then
still good to see John Belushi, though   :P

Gilda and Bill are good in "The Lubners", too
Title: Re: More fun with Windows wallpaper.
Post by: JPascoa on October 06, 2011, 04:43:32 PM
Hello Bill,

I found your program very funny (read interesting) and decided to convert and compile for x64 CPU as a way to practice x64 ASM programming. I did it, not with ML64 but with a similar compiler called JWasm because it appeared easier for a 64-bit asm noob like me.
All right, it is done, I can post it if someone wants.
What brings me here it is a problem that arises both in my x64 bit release and in your release.
It only works in Windows 7 (both 32-bit and 64-bit) in Basic mode (no aero glass), the problem is related with not retrieving HWND of SysListView32. If I find a solution I will come back here.

Cheers,
Jose
Title: Re: More fun with Windows wallpaper.
Post by: Bill Cravener on October 06, 2011, 06:10:57 PM
Hi JPascoa,

I have not tested HAL in Win 7 Aero but I'm running in Vista Aero at this moment using HAL without any problems (I detest Aero Glass!). I don't know what Win 7 is doing differently then Vista but its not surprising. If you find a solution let us know.
Title: Re: More fun with Windows wallpaper.
Post by: JPascoa on October 06, 2011, 07:16:17 PM
hi Bill,

It works in Vista, I tested. In 7, it appears to be related to something called DirectUIHWnd. But I don't know exactly how to deal with that.

Cheers
Jose

Title: Re: More fun with Windows wallpaper.
Post by: JPascoa on October 06, 2011, 07:52:08 PM
Quote from: Bill Cravener on October 06, 2011, 06:10:57 PM
Hi JPascoa,

I have not tested HAL in Win 7 Aero but I'm running in Vista Aero at this moment using HAL without any problems (I detest Aero Glass!). I don't know what Win 7 is doing differently then Vista but its not surprising. If you find a solution let us know.

I found the solution, it is explained here:
http://stackoverflow.com/questions/4834788/desktop-icon-manipulation-how-to-get-to-ge-a-handle-to-syslistview32-when-theme
Just replace progman with WorkerW  and it works (at least for me :wink)
Cheers,

Jose
Title: Re: More fun with Windows wallpaper.
Post by: Bill Cravener on October 06, 2011, 09:37:44 PM
I see, so it has to do with Win 7's background picture rotation themes which doesn't come with Vista. Thanks for the info Jose. :wink
Title: Re: More fun with Windows wallpaper.
Post by: JPascoa on October 13, 2011, 06:52:56 AM
Quote from: Bill Cravener on October 06, 2011, 09:37:44 PM
I see, so it has to do with Win 7's background picture rotation themes which doesn't come with Vista. Thanks for the info Jose. :wink

I posted the port here:
http://www.atelierweb.com/articles/hal9000.htm
Cheers,

Jose
Title: Re: More fun with Windows wallpaper.
Post by: Magnum on October 13, 2011, 11:10:49 AM
Quote from: Bill Cravener on September 26, 2011, 07:00:21 PM
Yep, we are getting old! I wonder how many here remember that guy? :lol

(http://www.quickersoft.com/pictures/bill.jpg)

I remember him along with Clutch Cargo and that show with the marionettes. :-)
Title: Re: More fun with Windows wallpaper.
Post by: dedndave on October 13, 2011, 01:19:24 PM
Quoteand that show with the marionettes

Beanie and Cecil
(http://t3.gstatic.com/images?q=tbn:ANd9GcQnbxQHXp_gv9fvizRLk9c-JWtUPPGnlE5xAHaMTG0L35OU1xaETKi4ZG-4)

you mean that one ?
Title: Re: More fun with Windows wallpaper.
Post by: Magnum on October 13, 2011, 05:42:12 PM
No, this one had some guys in a submarine.

http://en.wikipedia.org/wiki/Stingray_%28TV_show%29

Another favorite is the original Jason and the Argonauts, Time Machine, and War of the Worlds.

Title: Re: More fun with Windows wallpaper.
Post by: dedndave on October 13, 2011, 06:01:07 PM
stingray - i vaguely remember that one

QuoteAnother favorite is the original Jason and the Argonauts, Time Machine, and War of the Worlds.

war of the worlds is a bit too retro for me   :P
but the other 2 are great - haven't seen jason and the argonauts for years
Time Machine - i like all the Doug McClure stuff
i have a couple on the hard drive you might like - The Lost World and Return to the Lost World
for their time, crappy special effects - lol
but, they had Tamara Gorski in em   :U
Title: Re: More fun with Windows wallpaper.
Post by: Magnum on October 13, 2011, 11:15:48 PM
She isn't bad on the eyes.

Title: Re: More fun with Windows wallpaper.
Post by: dedndave on October 13, 2011, 11:48:45 PM
i have always liked her   :P
she's a blues singer, although, i have never heard any of her music

here's a pic of her in that movie
http://images3.cinema.de/imedia/3763/1993763,yp+T7PMY5lKvdiJRNP2232rRcIxVh8A_S7N9IsWuz4QEwaEPZZrjpU+rJbihmueTTpJCTKIusJ0qmDEDRKo4WA==.jpg