Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Cross-Process Subclassing

Cross-Process Subclassing

Scheduled Pinned Locked Moved C / C++ / MFC
comhelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Force Code
    wrote on last edited by
    #1

    I am trying to use a well-documented method to subclass across processes in windows (See the following:) http://www.codeproject.com/dll/subhook.asp[^] Specifically, I'm trying to subclass the taskbar so I can grab WM_PAINT messages and control how my app's taskbar button is drawn. Actually, this is cross-platform development, and in modern window systems the windows taskbar is a ToolbarWindow32 in Win98 its a SysTabControl32. But anyway, the method to subclass is to do a SetWindowsHookEx to the thread of the desktop control using a dll hook procedure (to get into its process address space) and then immediately subclass the control windproc and unhook. What I encounter is the following: I can callSetWindowsHookEx for a specific thread, and windows returns OK, but when I try to send a message to the control (in this case SysTabControl32) my hook proc doesn't pick up the message. (I'm using a WH_WNDPROC hook). Or, I can call SetWindowsHookEx and specify 0 for the thread (thus making it system-wide) and then my hookproc picks up the init msg, but when I try to subclass, SetWindowLong(...GWL_WNDPROC...) returns 0, so the system-wide hook isn't getting me into the desktop control address space. In any case, the thread-specific hook SHOULD work, and according to windows, the hook is created, but it never picks up my init msg. Incidentally, this problem I'm encountering is currently under Win98 (don't ask why). But the specific method of subclassing I'm using is supposed to be the most reliable, and valid across all versions of Windows, past and present. There's some crucial detail I'm forgetting that would enable me to subclass the windows taskbar. Does anybody know what it is?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups