CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2010
    Location
    South Africa
    Posts
    2

    Question Hook CallWndProc

    I try to hook it with several messages
    Code:
    if(wParam==0)
    {
       pcwp=(CWPSTRUCT*)lp;
       switch(pcwp->messgae)
       {
          case WM_SIZE:
          case WM_CLOSE:
          case WM_ACTIVATE:
            boolVar=TRUE;
          break;
       }
    }
    but only WM_ACTIVATE gets executed
    and It seems my hook only applies to the main windows, not all windows on desktop

    Thanks

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Hook CallWndProc

    And where is this code supposed to use?
    Victor Nijegorodov

  3. #3
    Join Date
    Aug 2010
    Location
    South Africa
    Posts
    2

    Re: Hook CallWndProc

    Thanks It is within the HookProc and boolVar will be returned and used in WM_PAINT

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Hook CallWndProc

    Could you be so kind to show your HookProc and together with the declarations/definitions of all the variables used in your code?
    And, please, show your actual code, not a pseudo which can only confuse all of us (for example what is this pcwp->messgae - ?)
    Victor Nijegorodov

  5. #5
    Join Date
    Aug 2010
    Posts
    51

    Thumbs up Re: Hook CallWndProc

    hi,


    I try to hook it with several messages



    regards,
    phe9oxis,
    http://www.guidebuddha.com

  6. #6
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Hook CallWndProc

    Quote Originally Posted by mani3355 View Post
    I try to hook it with several messages
    What "several messages"?
    How?

    PS: didn't you read my questions in the post#4?
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured