News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

More fun with Windows wallpaper.

Started by Bill Cravener, September 25, 2011, 02:02:04 PM

Previous topic - Next topic

Bill Cravener

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/examples/Hal9000.zip

Or it can be downloaded from my site link below.

My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat

fearless

ƒearless

dedndave

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

Bill Cravener

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
My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat

dedndave

 :bdg

i can probably find all kinds of HAL 9000 "Dave" WAV files
thing is - i only have one sound for errors   :lol

Bill Cravener

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
My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat

dedndave


Bill Cravener

Yep, we are getting old! I wonder how many here remember that guy? :lol

My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat

dedndave

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

JPascoa

#9
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

Bill Cravener

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.
My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat

JPascoa

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


JPascoa

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

Bill Cravener

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
My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat

JPascoa

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