Results 1 to 20 of 20

Thread: IDE crashing after running a program with subclassing

Threaded View

  1. #6
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    10,909

    Re: IDE crashing after running a program with subclassing

    Hi Ted,

    What's most obvious to me is that you've got an extra comma in your call to RemoveWindowSubclass. I'm not sure you're getting it removed.

    Quote Originally Posted by TedH View Post
    RemoveWindowSubclass, Me.hwnd, AddressOf SubClassProc, ID
    That actually makes me wonder how you've got RemoveWindowSubclass declared. I wouldn't mind seeing that too. Here are mine:

    Code:
    
    Private Declare Function SetWindowSubclass Lib "comctl32.dll" Alias "#410" (ByVal hWnd As Long, ByVal pfnSubclass As Long, ByVal uIdSubclass As Long, Optional ByVal dwRefData As Long) As Long
    Private Declare Function GetWindowSubclass Lib "comctl32.dll" Alias "#411" (ByVal hWnd As Long, ByVal pfnSubclass As Long, ByVal uIdSubclass As Long, pdwRefData As Long) As Long
    Private Declare Function RemoveWindowSubclass Lib "comctl32.dll" Alias "#412" (ByVal hWnd As Long, ByVal pfnSubclass As Long, ByVal uIdSubclass As Long) As Long
    Private Declare Function DefSubclassProc Lib "comctl32.dll" Alias "#413" (ByVal hWnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    
    Good Luck,
    Elroy
    Last edited by Elroy; Jan 21st, 2018 at 09:58 AM.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

Tags for this Thread

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