The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: Rockphorr on June 01, 2009, 07:49:38 AM

Title: How to write on desktop over wallpapper by subclassing
Post by: Rockphorr on June 01, 2009, 07:49:38 AM
I have got hwnd of desktop by getdesktopwindow
After I try subclss it by replace windproc of desktop but no effcet.
I have replaced succesfuly wndproc of child button.
Title: Re: How to write on desktop over wallpapper by subclassing
Post by: donkey on June 01, 2009, 08:09:57 AM
The desktop (Explorer) is a separate process and cannot be subclassed by simply using SetWindowLong as you would with a child control. You cannot subclass a window or class that belongs to another process. The reason for this is that the two processes (yours and the desktop) exist in their own address spaces and the address you pass to the desktop process does not contain the same data within that process as it does in yours. The methods used to subclass windows in other processes involve code injection and discussing such coding here skirts dangerously close to violating the rules, if not an outright violation.
Title: Re: How to write on desktop over wallpapper by subclassing
Post by: BlackVortex on June 01, 2009, 09:44:08 AM
Best solution would be something like what WindowBlinds does, set a global hook so that our dll gets injected on all running and future processes automatically.

? Profit ?
Title: Re: How to write on desktop over wallpapper by subclassing
Post by: hutch-- on June 01, 2009, 01:50:41 PM
It is actually easier to use a transparent window created with CreateWindowEx() using the desktop window handle as its parent. This way you can do anything you like on the desktop without trying to get around the problem of a seperate running process in seperate memory space.
Title: Re: How to write on desktop over wallpapper by subclassing
Post by: ecube on June 01, 2009, 02:17:59 PM
I hope one day, the forum rules here on api hooking can be reduced as the practice can be used for a great deal of good. Microsoft themselves feared such things for awhile, but now they openly imbrace it with their detour library. Myself I use it occasionally on some of my favorite applications to add that extra functionality I always wish they had but don't. Api hooking lets me add what I want strickly in memory which doesn't violate copyright terms etc...as I don't actually modify the original software in anyway on disk, to remove any changes its as simple as closing the application.
Title: Re: How to write on desktop over wallpapper by subclassing
Post by: dedndave on June 01, 2009, 03:10:49 PM
i would take the easy way out
find their wallpaper image and glue my stuff in it - lol
Title: Re: How to write on desktop over wallpapper by subclassing
Post by: Vortex on June 01, 2009, 05:01:37 PM
How do I subclass the Desktop Window? (http://vcfaq.mvps.org/sdk/19.htm)
Title: Re: How to write on desktop over wallpapper by subclassing
Post by: Rockphorr on November 03, 2009, 06:00:57 AM
Quote from: dedndave on June 01, 2009, 03:10:49 PM
i would take the easy way out
find their wallpaper image and glue my stuff in it - lol
Do you mean a Zara ???
What is she ???
Title: Re: How to write on desktop over wallpapper by subclassing
Post by: hutch-- on November 03, 2009, 07:40:12 AM
His wife.  :bg
Title: Re: How to write on desktop over wallpapper by subclassing
Post by: Rockphorr on November 03, 2009, 09:16:08 AM
Quote from: hutch-- on November 03, 2009, 07:40:12 AM
His wife.  :bg


:bg :bg :bg
:bdg :bdg :bdg
:lol :lol :lol :lol
Title: Re: How to write on desktop over wallpapper by subclassing
Post by: Rockphorr on November 03, 2009, 09:22:54 AM
Quote from: hutch-- on November 03, 2009, 07:40:12 AM
His wife.  :bg


What star is she ??
I feel that i saw she but don't remember.
Title: Re: How to write on desktop over wallpapper by subclassing
Post by: dedndave on November 03, 2009, 11:34:02 AM
she is my star - lol
she has worked in movie production, but i doubt you have ever seen her
she was just low enough on the totem-pole to not get her name in credits
well - on some of the documentaries she worked on, maybe
Title: Re: How to write on desktop over wallpapper by subclassing
Post by: Rockphorr on November 03, 2009, 12:43:53 PM
Quote from: dedndave on November 03, 2009, 11:34:02 AM
she is my star - lol
she has worked in movie production, but i doubt you have ever seen her
she was just low enough on the totem-pole to not get her name in credits
well - on some of the documentaries she worked on, maybe

For short, to make her your wife is your target(dream)  :bg
Title: Re: How to write on desktop over wallpapper by subclassing
Post by: baltoro on November 05, 2009, 06:08:35 PM
If you are INCREDIBLY LAZY (like me), you can just use BGInfo from SysInternals (TechNet).   
It uses the DAVE TECHNIQUE:   
Quotei would take the easy way out
find their wallpaper image and glue my stuff in it - lol
http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx
Title: Re: How to write on desktop over wallpapper by subclassing
Post by: dedndave on November 05, 2009, 06:59:33 PM
see - i am not as dumb as i look   :bg