CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 22

Threaded View

  1. #1
    Join Date
    Sep 2003
    Location
    NW/Indiana
    Posts
    22

    Another Hook question

    I'm trying to hook the creation of the 'Page Setup' dialog box. In particular, I am trying to hook the one that is created in Internet Explorer from the file menu.

    I have created a global hook and hook proc in a dll file and have been succesful at testing a capture of the right mouse button and other things but I can't seem to find out what to do to catch the creation of any dialog box including the one that I am interested in.

    Here's my code that I'm using to set the hook.
    pData->g_hHook = SetWindowsHookEx (WH_GETMESSAGE, (HOOKPROC) SecProc, pData->g_hInstance, 0) ;
    Is WH_GETMESSAGE the proper way to do this or is it done in another way?

    I also don't know exactly which message I should be checking for. I'm assuming it would be WM_CREATE but I then would need to be able to distinghuish what is getting created and disregard it if it's not what I'm looking for. And I haven't been able to hook that message yet.

    I know that I'll slap my self in the forehead once I have an answer to this but I'm up against a wall for an answer right now.

    Thank you in advance for any input on this.
    Last edited by patrickmoe; August 17th, 2006 at 05:30 PM.

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