D
Dirk Schippers
Hi,
I am using winforms in C++ to create a gui for my directx application.
The form is divided into 4 panels with three splitcontainers, (one for
vertical and two for horizontal).
Now, in the directx part, I render to the four panels by using their
handles, but I experience a lot of flickering when resizing the form or
the splitters.
I read that you can prevent flickering by setting the style to one or
more of ControlStyles::AllPaintingInWmPaint,
ControlStyles:oubleBuffer, ControlStyles::UserPaint. But I can't set
it to the panels themselves because I then get a compiler error:
*error C3767: 'System::Windows::Forms::Control::SetStyle': candidate
function(s) not accessible*
I read somewhere that this is normal, that you should set the style to
the form (but that doesn't help) or that you should create a custom
Panel class inheriting from the normal panel class and set its style in
its constructor.
But there the problem comes up, how can I create a custom panel class to
be used inside a splitcontainer?
Or is there a totally different way to prevent the flickering I'm
experiencing?
Thanks,
Dirk.
I am using winforms in C++ to create a gui for my directx application.
The form is divided into 4 panels with three splitcontainers, (one for
vertical and two for horizontal).
Now, in the directx part, I render to the four panels by using their
handles, but I experience a lot of flickering when resizing the form or
the splitters.
I read that you can prevent flickering by setting the style to one or
more of ControlStyles::AllPaintingInWmPaint,
ControlStyles:oubleBuffer, ControlStyles::UserPaint. But I can't set
it to the panels themselves because I then get a compiler error:
*error C3767: 'System::Windows::Forms::Control::SetStyle': candidate
function(s) not accessible*
I read somewhere that this is normal, that you should set the style to
the form (but that doesn't help) or that you should create a custom
Panel class inheriting from the normal panel class and set its style in
its constructor.
But there the problem comes up, how can I create a custom panel class to
be used inside a splitcontainer?
Or is there a totally different way to prevent the flickering I'm
experiencing?
Thanks,
Dirk.