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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Taskbar is hooked

Taskbar is hooked

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 Posts 2 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.
  • C Offline
    C Offline
    Cvaji
    wrote on last edited by
    #1

    I have hooked taskbar. Below code is the new window procedure for task bar. But when I tried to send message with valid m_hDlgWnd of my application window. But it is not working.:confused: Is it not possible to send message from this task bar window procedure?

    LRESULT CALLBACK NewProc(
    HWND hwnd, // handle to window
    UINT uMsg, // message identifier
    WPARAM wParam, // first message parameter
    LPARAM lParam // second message parameter
    )
    {
    switch (uMsg)
    {
    case WM_PAINT:
    ::SendMessage( m_hDlgWnd, WM_TASKBAR_UPDATED_EVENT,0,0 );// NOT WORKING
    ::SetEvent( m_hTaskBarUpdatedEvent ); // NOT WORKING
    ::MessageBeep( MB_OK );
    break;
    }

    return CallWindowProc( OldProc,hwnd,uMsg,wParam,lParam );
    

    }

    -Cvaji

    C 1 Reply Last reply
    0
    • C Cvaji

      I have hooked taskbar. Below code is the new window procedure for task bar. But when I tried to send message with valid m_hDlgWnd of my application window. But it is not working.:confused: Is it not possible to send message from this task bar window procedure?

      LRESULT CALLBACK NewProc(
      HWND hwnd, // handle to window
      UINT uMsg, // message identifier
      WPARAM wParam, // first message parameter
      LPARAM lParam // second message parameter
      )
      {
      switch (uMsg)
      {
      case WM_PAINT:
      ::SendMessage( m_hDlgWnd, WM_TASKBAR_UPDATED_EVENT,0,0 );// NOT WORKING
      ::SetEvent( m_hTaskBarUpdatedEvent ); // NOT WORKING
      ::MessageBeep( MB_OK );
      break;
      }

      return CallWindowProc( OldProc,hwnd,uMsg,wParam,lParam );
      

      }

      -Cvaji

      C Offline
      C Offline
      Cvaji
      wrote on last edited by
      #2

      After finding the window again, it is worked. :)

      case WM_PAINT:
      {
      m_hDlgWnd = ::FindWindow( NULL, "HackTaskBar" );
      ::SendMessage( m_hDlgWnd, WM_TASKBAR_UPDATED_EVENT,0,0 );// WORKING
      ::MessageBeep( MB_OK );
      break;
      }

      C 1 Reply Last reply
      0
      • C Cvaji

        After finding the window again, it is worked. :)

        case WM_PAINT:
        {
        m_hDlgWnd = ::FindWindow( NULL, "HackTaskBar" );
        ::SendMessage( m_hDlgWnd, WM_TASKBAR_UPDATED_EVENT,0,0 );// WORKING
        ::MessageBeep( MB_OK );
        break;
        }

        C Offline
        C Offline
        Code o mat
        wrote on last edited by
        #3

        Just be carefull with SendMessage, you can run into deadlocks (i'm not saying you will), if the timing isn't that important for what you need, i recommend using PostMessage instead... [edit] I mean if you use SendMessage between different threads/processes...

        > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Sometimes you just have to hate coding to do it well. <

        modified on Tuesday, March 30, 2010 12:05 PM

        C 1 Reply Last reply
        0
        • C Code o mat

          Just be carefull with SendMessage, you can run into deadlocks (i'm not saying you will), if the timing isn't that important for what you need, i recommend using PostMessage instead... [edit] I mean if you use SendMessage between different threads/processes...

          > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Sometimes you just have to hate coding to do it well. <

          modified on Tuesday, March 30, 2010 12:05 PM

          C Offline
          C Offline
          Cvaji
          wrote on last edited by
          #4

          Yes. You are write. :) Thank you for reminding me -Cvaji

          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