RemoveWindowSubclass

Syntax:

RemoveWindowSubclass( hWnd, pfnSubclass, uID )

Parameters:

hWnd

=

(in)

pfnSubclass

=

(in) Pointer to callback-function

uID

=

(in) Subclass ID


Return Values:

#TRUE

=

The subclass callback was successfully removed.

#FALSE

=

The subclass callback was not removed


Description:

Removes a subclass callback from a window.

Subclass callbacks are identified by their combination of the callback address and the caller-defined subclass ID


Example:

  Enumeration
    #Subclass_0
  EndEnumeration

  Procedure Callback(hwnd,uMsg,wParam,lParam,uId,uData)

    ProcedureReturn DefSubclassProc(hwnd,uMsg,wParam,lParam)
  EndProcedure

  hwnd = OpenWindow(0,#PB_Ignore,#PB_Ignore,200,200,"SubClass")

  SetWindowSubclass(hwnd,@Callback(),#Subclass_0,0)

  If RemoveWindowSubclass(hwnd,@Callback(),#Subclass_0)
    Debug "entfernt"
  EndIf

  Repeat
    event = WaitWindowEvent()

  Until event = #PB_Event_CloseWindow


Supported OS:   Windows