no i just remove some lines (purebasic commands and IDContainer) and create a class like purebasic do then CreateWindowEx_ intead of ContainerGadget (i just create a hook on another program for see members of WNDCLASSEX not in COMatePlus.pbi) all of thing i do this :
Code: Select all
Container.WNDCLASSEX
Container\cbSize = SizeOf(WNDCLASSEX)
Container\lpszClassName = @"PureContainer"
Container\lpfnWndProc = @ContainerCBS()
Container\hbrBackground = #COLOR_BTNSHADOW
Container\cbWndExtra = 4
RegisterClassEx_(Container)
Procedure.i COMate_CreateActiveXControl(Parent, x, y, width, height, progID$, blnInitCOM = #True)
Protected *this._membersCOMateClass, hResult, id, hWnd, iDisp
CompilerIf Defined(COMATE_NOINCLUDEATL, #PB_Constant)=0
If progID$
hWnd = CreateWindowEx_(#Null, @"PureContainer", #Null, #WS_CHILD|#WS_VISIBLE|#WS_CLIPCHILDREN, x, y, width, height, Parent, -1, GetModuleHandle_(0), #Null)
If hWnd
*this = COMate_CreateObject(progID$, hWnd, blnInitCOM) ;This procedure will set any HRESULT codes.
If *this
;SetWindowLongPtr_(hWnd, #GWL_STYLE, GetWindowLongPtr_(hWnd, #GWL_STYLE)|#WS_CLIPCHILDREN)
*this\hWnd = hWnd
Else ;Cannot locate an iDispatch interface.
CloseWindow_(hWnd)
EndIf
ProcedureReturn *this
Else
hResult = #E_OUTOFMEMORY
EndIf
Else
hresult = #E_INVALIDARG
EndIf
CompilerIf Defined(COMATE_NOERRORREPORTING, #PB_Constant)=0
COMateClass_INTERNAL_SetError(*this, hResult)
CompilerEndIf
CompilerEndIf
ProcedureReturn 0
EndProcedure
Anyway thanks.