event OwnerDrawEnd (Panel as Panel, hDC as Long)
Ends painting the owner draw panel.

TypeDescription
Panel as Panel A Panel object being painted
hDC as Long A long expression that indicates the handle to the painting device context ( HDC )
The control fires the  OwnerDrawEnd event when painting the panel is done. The OwnerDrawEnd event is fired after default painting is done. The OwnerDrawStart event is fired when a panel requires to be painted. The OwnerDrawStart event is fired only for owner draw panels. Use the OwnerDraw property to specify which panel is owner draw and which panel is not. You can use the OwnerDrawStart event to avoid painting any panel using the DefaultPainting parameter. Use the OwnerDrawStart event to perform painting panel before default implementation is called. For instance, if the owner panel pains a transparent or lucent skin, the OwnerDrawStart event lets you paint the panel before putting the default skin. The rectangle that should be painted in the device context can be retrieved using the GetClipBox API function

 

Syntax for OwnerDrawEnd event, /NET version, on:

private void OwnerDrawEnd(object sender,exontrol.EXSTATUSBARLib.Panel Panel,int hDC)
{
}

Private Sub OwnerDrawEnd(ByVal sender As System.Object,ByVal Panel As exontrol.EXSTATUSBARLib.Panel,ByVal hDC As Integer) Handles OwnerDrawEnd
End Sub

Syntax for OwnerDrawEnd event, /COM version, on:

private void OwnerDrawEnd(object sender, AxEXSTATUSBARLib._IStatusBarEvents_OwnerDrawEndEvent e)
{
}

void OnOwnerDrawEnd(LPDISPATCH Panel,long hDC)
{
}

void __fastcall OwnerDrawEnd(TObject *Sender,Exstatusbarlib_tlb::IPanel *Panel,long hDC)
{
}

procedure OwnerDrawEnd(ASender: TObject; Panel : IPanel;hDC : Integer);
begin
end;

procedure OwnerDrawEnd(sender: System.Object; e: AxEXSTATUSBARLib._IStatusBarEvents_OwnerDrawEndEvent);
begin
end;

begin event OwnerDrawEnd(oleobject Panel,long hDC)
end event OwnerDrawEnd

Private Sub OwnerDrawEnd(ByVal sender As System.Object, ByVal e As AxEXSTATUSBARLib._IStatusBarEvents_OwnerDrawEndEvent) Handles OwnerDrawEnd
End Sub

Private Sub OwnerDrawEnd(ByVal Panel As EXSTATUSBARLibCtl.IPanel,ByVal hDC As Long)
End Sub

Private Sub OwnerDrawEnd(ByVal Panel As Object,ByVal hDC As Long)
End Sub

LPARAMETERS Panel,hDC

PROCEDURE OnOwnerDrawEnd(oStatusBar,Panel,hDC)
RETURN

Syntax for OwnerDrawEnd event, /COM version (others), on:

<SCRIPT EVENT="OwnerDrawEnd(Panel,hDC)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function OwnerDrawEnd(Panel,hDC)
End Function
</SCRIPT>

Procedure OnComOwnerDrawEnd Variant llPanel Integer llhDC
	Forward Send OnComOwnerDrawEnd llPanel llhDC
End_Procedure

METHOD OCX_OwnerDrawEnd(Panel,hDC) CLASS MainDialog
RETURN NIL

void onEvent_OwnerDrawEnd(COM _Panel,int _hDC)
{
}

function OwnerDrawEnd as v (Panel as OLE::Exontrol.StatusBar.1::IPanel,hDC as N)
end function

function nativeObject_OwnerDrawEnd(Panel,hDC)
return

The following VB sample displays a curve in the owner draw panel:

Private Type RECT
        Left As Long
        Top As Long
        Right As Long
        Bottom As Long
End Type
Private Type POINTAPI
        x As Long
        y As Long
End Type

Private Declare Function GetClipBox Lib "gdi32" (ByVal hdc As Long, lpRect As RECT) As Long
Private Declare Function PolyBezier Lib "gdi32" (ByVal hdc As Long, lppt As POINTAPI, ByVal cPoints As Long) As Long
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Private Declare Function CreatePen Lib "gdi32" (ByVal nPenStyle As Long, ByVal nWidth As Long, ByVal crColor As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long

Private Sub StatusBar1_OwnerDrawStart(ByVal Panel As EXSTATUSBARLibCtl.IPanel, ByVal hdc As Long, DefaultPainting As Boolean)
    Dim r As RECT
    GetClipBox hdc, r
    hPen = CreatePen(0, 3, RGB(255, 0, 0))
    hOPen = SelectObject(hdc, hPen)
    r.Left = r.Left + 4
    r.Right = r.Right - 4
    r.Top = r.Top + 4
    r.Bottom = r.Bottom - 4
    Dim p(7) As POINTAPI
    p(0).x = r.Left
    p(0).y = r.Bottom
    p(1).x = (r.Left + r.Right) / 2
    p(1).y = r.Top
    p(2).x = r.Left
    p(2).y = r.Top
    p(3).x = 2 * (r.Left + r.Right) / 3
    p(3).y = (r.Bottom + r.Top) / 2
    p(4).x = 2 * (r.Left + r.Right) / 3
    p(4).y = r.Top
    p(5).x = 4 * (r.Left + r.Right) / 5
    p(5).y = (r.Bottom + r.Top) / 3
    p(6).x = r.Right
    p(6).y = r.Bottom
    PolyBezier hdc, p(0), 7
    SelectObject hdc, hOPen
    DeleteObject hOPen
End Sub

The following C++ sample displays a curve in the owner draw panel:

void OnOwnerDrawStartStatusbar1(LPDISPATCH Panel, long hDC, BOOL FAR* DefaultPainting) 
{
	HDC h = (HDC)hDC;
	RECT r = {0};

	GetClipBox( h, &r );
	CPanel panel(Panel);
	panel.m_bAutoRelease = FALSE;
	POINT p[7] = {(0,0)};
	HPEN hPen = CreatePen( PS_SOLID, 3, RGB(255,0,0) );
	HPEN hOPen = (HPEN)::SelectObject( h, hPen );
	InflateRect( &r, -4, -4 );

	p[0].x = r.left;
	p[0].y = r.bottom;
	p[1].x = (r.left + r.right) / 2;
	p[1].y = r.top;
	p[2].x = r.left;
	p[2].y = r.top;
	p[3].x = 2 * (r.left + r.right) / 3;
	p[3].y = (r.bottom + r.top) / 2;
	p[4].x = 2 * (r.left + r.right) / 3;
	p[4].y = r.top;
	p[5].x = 4 * (r.left + r.right) / 5;
	p[5].y = (r.bottom + r.top) / 3;
	p[6].x = r.right;
	p[6].y = r.bottom;
	PolyBezier( h, p, 7 );

	::SelectObject( h, hOPen );
	DeleteObject( hPen );
}