|
-
Jan 27th, 2002, 08:16 PM
#1
Thread Starter
New Member
Subclassing...wheres my error?!
Alright, I've made a program that uses several hotkeys. To do this, I implemented subclassing. When I exit the program, I get an error...
I have the SetWindowLong() codes inside a form that is active the whole program, but the program starts with a Sub Main().
The referenced procedure is in a module, as advised. Code is as follows:
Code:
Public Function CheckMessage(ByVal hWnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Select Case uMsg
Case WM_HOTKEY
HotKeyPress wParam
CheckMessage = 1
Exit Function
Case Else
CheckMessage = CallWindowProc(PrevProc, hWnd, uMsg, wParam, lParam)
End Select
End Function
When I use the hotkey CTRL-SHIFT-F5 my program ends. As I unload the form I'm using in the module, the form initiates the code:
SetWindowLong frmOptions.hWnd, GWL_WNDPROC, PrevProc
And then the program ends.
Any ideas where the error might be coming from?
Thanks a bunch in advance,
-Steve
Last edited by iawix; Jan 27th, 2002 at 08:21 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|