I bet u need a fusion powered shuttle to reach my place...
Posts
963
Safe subclassing - no more crash - d/l the simple codes here
I've written a simple ActiveX DLL for use with subclassing.
If you've always crashed ur machine for forgetting to unsubclass
the window, this simple DLL will help you around on that.
VB Code:
'General Declarations
Dim WithEvents myHook As WindowHook.Hook
'In a procedure
Set myHook = New WindowHook.Hook
myHook.CallDefaultProc = True 'Let default procedure to process
'the messages, always set to True
myHook.HookWindow Me.hWnd
'And there's only one event:
Private Sub myHook_WindowMessage(hwnd As Long, uMsg As Long, wParam As Long, lParam As Long)
'Your codes here
End Sub
well, not as good as Merrion's, but this serve as a primitive
but easy subclassing method that's crash prone(due to its DLL
nature) and can be instatiated - which means you can subclass
a lot of stuffs. If you code it yourself, you've to make a lot of
module window message handling procedures, and that's very
undynamic.
ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
Programming is fun, but only if you're not on a tight deadline
So I consider all those working engineers sad people
I bet u need a fusion powered shuttle to reach my place...
Posts
963
Oh...sorry.
Forgot to submit the module along.
Here's the complete one. Download this one instead.
It has an example project mouseleave.vbp to show how
windowhook works.
ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
Programming is fun, but only if you're not on a tight deadline
So I consider all those working engineers sad people
I bet u need a fusion powered shuttle to reach my place...
Posts
963
stupid me
I mean crash proof
got twisted wif dis words
ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
Programming is fun, but only if you're not on a tight deadline
So I consider all those working engineers sad people