Results 1 to 40 of 4215

Thread: CommonControls (Replacement of the MS common controls)

Threaded View

  1. #11
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,229

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    SUBCLASSING ADVICE

    Up to now I use SSUBTMR6.DLL for subclassing.
    From now on, I want to use the same technique that Krool uses in his controls.

    I'm stuck.
    Implements ISubclass creates the ISubclass_Message function, and I could do what I want from there.
    But I don't know how to bring messages into the game.
    In SSUBTMR6.DLL I simply had to attach/detach messages, which I could process in ISubclass_WindowProc.

    How does it work with Krool's subclassing?
    A very basic example would help me out.

    Thank you.

    Edit:
    I try this in the main form of the example (post #1).
    Krool's method (common controls subclassing) does not filter messages. unless intercepted, you get them all.

    also you gotta make sure you forward to ComCtlsDefaultProc (DefSubclassProc) in your ISubclass_Message
    Code:
    Option Explicit
    
    Implements ISubclass
    
    Private Sub Form_Load()
        ComCtlsSetSubclass hWnd, Me, 0
    End Sub
    
    Private Sub Form_Unload(Cancel As Integer)
        ComCtlsRemoveSubclass hWnd
    End Sub
    
    Private Function ISubclass_Message(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long, ByVal dwRefData As Long) As Long
        Select Case wMsg
            Case WM_DESTROY
        End Select
        ISubclass_Message = ComCtlsDefaultProc(hWnd, wMsg, wParam, lParam)
    End Function
    Last edited by DEXWERX; Oct 5th, 2017 at 12:38 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
  •  



Click Here to Expand Forum to Full Width