Luke Gardiner
New Member
Hello All,
I'm attempting to trap for various messages that gets sent to a progress window, such as the window has been moved (WM_MOVE). Other posts suggest using the Msgblst32 OCX, however it appears that only some of the messages get through such as the when the middle mouse button is scrolled. Put the OCX into a Delphi form however and everything works fine.
Other attempts have included writing my own msgblst in VB or Delphi, without much luck. The only attempt that worked was using a timer and various calls to the WinAPI to build my own "triggers", one for when the window starts to move and one for when it stops, however having that timer interrupting constantly was a huge drawback for a small feature.
Now my understanding of the OCX is that it uses the SetWindowLong WinAPI function with the GWL_WNDPROC flag to change the procedure to which the messages are sent. I've tried making a SetWindowLong call from a 4GL process but get bogged down when it comes to entering the address of the procedure to replace the old one. Anyone know how to obtain the address of a procedure that windows will understand, or have any other suggestions for intercepting windows messages, before progress gets a hold of em.
Thanks
P.S. I read somewhere that Delphi has a "hidden window" that receives the win msg's and passes them onto the a "visible one". Any chance that progress has one too and hence the WINDOW-NAME:hWND used with the OCX, is not actually the one to which the messages are sent?
Luke Gardiner
Systems Officer
Dental Health Services
Luke.Gardiner@dental.health.wa.gov.au
I'm attempting to trap for various messages that gets sent to a progress window, such as the window has been moved (WM_MOVE). Other posts suggest using the Msgblst32 OCX, however it appears that only some of the messages get through such as the when the middle mouse button is scrolled. Put the OCX into a Delphi form however and everything works fine.
Other attempts have included writing my own msgblst in VB or Delphi, without much luck. The only attempt that worked was using a timer and various calls to the WinAPI to build my own "triggers", one for when the window starts to move and one for when it stops, however having that timer interrupting constantly was a huge drawback for a small feature.
Now my understanding of the OCX is that it uses the SetWindowLong WinAPI function with the GWL_WNDPROC flag to change the procedure to which the messages are sent. I've tried making a SetWindowLong call from a 4GL process but get bogged down when it comes to entering the address of the procedure to replace the old one. Anyone know how to obtain the address of a procedure that windows will understand, or have any other suggestions for intercepting windows messages, before progress gets a hold of em.
Thanks
P.S. I read somewhere that Delphi has a "hidden window" that receives the win msg's and passes them onto the a "visible one". Any chance that progress has one too and hence the WINDOW-NAME:hWND used with the OCX, is not actually the one to which the messages are sent?
Luke Gardiner
Systems Officer
Dental Health Services
Luke.Gardiner@dental.health.wa.gov.au