Example #1
0
        protected override HandleRef BuildWindowCore(HandleRef hwndParent)
        {
            _hwndHost = CreateWindowEx(0, "static", "",
                                       WsChild | WsVisible,
                                       0, 0,
                                       _hostWidth,
                                       _hostHeight,
                                       hwndParent.Handle,
                                       (IntPtr)HostId,
                                       IntPtr.Zero,
                                       0);

            _viewport.Initialise(_hwndHost);
            _viewport.LoadTexture("sample", "sample.png");
            _viewport.Update();

            return(new HandleRef(this, _hwndHost));
        }