protected override void OnPaint(PaintEventArgs e)
    {
        var    graphics = e.Graphics;
        IntPtr hdc;

        if (m_CachedBitmapPtr == IntPtr.Zero)
        {
            hdc = graphics.GetHdc();
            unsafe {
                m_CachedBitmapPtr = (IntPtr)BitmapUtility.CreateCachedBitmapPtr((void *)m_BitmapPtr, (void *)hdc);
            }
            graphics.ReleaseHdc(hdc);
        }
        hdc = graphics.GetHdc();
        unsafe {
            BitmapUtility.DrawCachedBitmap((void *)hdc, (void *)m_CachedBitmapPtr, 0, 0);
        }
        graphics.ReleaseHdc(hdc);
    }