Results 1 to 5 of 5

Thread: Subclassing...wheres my error?!

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Location
    IL, USA
    Posts
    5

    Arrow 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.
    iawix.com software...
    http://www.iawix.com/

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