CreateParams Confusion

166 views Asked by At

I am creating a class to simplify designing controls. It's called ControlDrawer and has three private fields:

  • a Point named _location
  • a Bitmap named _innerImage
  • a NativeWindow named _window

I have most of the class done, but here's my snagging point (note, ControlDrawer implements IWin32Window):

IntPtr Handle
{
    get
    {
        CreateParams cp = new CreateParams();
        cp.X = _location.X;
        cp.Y = _location.Y;

        // Code to make it so CreateParams says to display _innerImage

        _window.CreateHandle(cp);
        return _window.Handle;
    }
}

The problem is, I have no idea how to fill in the commented part. Can someone help?

0

There are 0 answers