Click to See Complete Forum and Search --> : How do I subclass the desktop?
nordyj
May 28th, 1999, 02:08 PM
I'm having difficultry trying to subclass the desktop. I've tried the following:
subClass.SubclassWindow(GetDesktopWindow()->m_hWnd);
subClass is a class that I've derived from CWnd to capture messages. Any help is appreciated.
Safai Ma
May 28th, 1999, 04:00 PM
If you use Spy, you will see that the desktop is actually the a List Control("Program Manager"->SHELLDLL_DefView->SysListView32). You may want to subclass that one instead.
-Safai
Andris Spruds
May 29th, 1999, 02:27 AM
Hello,
You mean I can subclass any window, even one that doesn't belongs to my application ? How to do this if I have handle (HWND) to this window ?
Regards,
Andris
Vali
June 13th, 1999, 09:57 PM
This will not work since under WIN32, you cannot subclass windows belonging to other processess (SetWindowLong(...), used for actually performing the Subclassing will return zero when it detects that you are trying to subclass a window in another process). You must either use a Shell NameSpace extension or use system wide hook to get the shell to insert (inject) you (your dll) in shell's address space. then you can subclass the desktop.
Hope this helps.
Vali
nordyj
June 15th, 1999, 01:15 PM
I'm about 6 months into using Visual C++. Do you have, or do you know the location of an example of using Shell Namespaces? I've heard of namespaces, but have yet to use one. I appreciate the input.
Vali
June 16th, 1999, 03:56 PM
One of the best books on the market for NameSpace / Shell extensions is:
Visual C++ Windows Shell Programming
By
Dan Esposito
Wrox Books
klkvgupta
February 12th, 2002, 08:18 AM
Please suggest me how to inject my system wide hook into shell dll.
Gupta.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.