Results 1 to 5 of 5

Thread: Finding Active MDI CHILD [RESOLVED]*

Threaded View

  1. #1

    Thread Starter
    Addicted Member SpeedyDog's Avatar
    Join Date
    Feb 2004
    Location
    Missouri, USA
    Posts
    189

    Resolved Finding Active MDI CHILD [RESOLVED]*

    Ok, first of all a little background:

    I have mdi setup this is something similar to how a normal graphics program has their MDI setup(ex: paintshoppro, photoshop)... ok now I need a Mouse Subclass hook, I know nothing about them really, to catch the scroll wheel. but it needs to be individual to each child that is created. The scroll wheel is to zoom... so I have some code that contains:

    VB Code:
    1. Public Function WindProc(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    2.     On Error Resume Next
    3.     If wMsg = WM_MOUSEWHEEL Then
    4.         If HiWord(wParam) < 0 Then
    5.             MsgBox "here1"
    6.         Else
    7.             MsgBox "here2"
    8.         End If
    9.     End If
    10.  
    11.     WindProc = CallWindowProc(WndProcOld&, hwnd&, wMsg&, wParam&, lParam&)
    12.    
    13. End Function

    this was found at an example on here, but it seems difficult to do it because this sub is called from... hmm actually I dont know where because I dont understand subhooking very well...

    but where ever it gets called from.... I dont know how to do this for the MDICHILD ... and basically I dont care how it gets done I just need the public variable "zoom" on the MDICHILD to change according to which way the scrollwheel is going, if you need more information to help me... no problem but please help because this sub classing/hooking confuses me.



    -SpeedyDog
    Last edited by SpeedyDog; Dec 31st, 2004 at 03:08 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