Posted 19 years ago by Jake Pearson - Software Developer, Alion Science and Technology
Avatar
Hi,
In our application one of the tool windows holds a DirectX window. Since we have switched to the new UI Studio, it no longer works. Do you have any idea why this might be the case, maybe anything special you had to do with Windows Handles in the new version that is different from the old one.

thanks,
Jake

Comments (3)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The only major difference is that in DockableWindow, controls used to inherit Panel whereas now they inherit ContainerControl (indirectly). We don't use much API code in UIStudio.

The major areas are drawing the rubber bands on the screen. However we do use GDI bitmaps for double-buffering (because they are much faster than the same thing in GDI+) when drawing any UIControl or UIContainerControl. Perhaps that could be conflicting somehow?


Actipro Software Support

Posted 19 years ago by Jake Pearson - Software Developer, Alion Science and Technology
Avatar
Hi,
We are continuing to work on this problem. DirectX grabs a window handle and renders to where that handle is supposed to be, in our case it is a Panel control that is sitting in a ToolWindow. When the program starts the directx window is fine. I then close the window and it is still fine. When the window is reactivated, the directx driver dies. We believe this is because at some point during the tool window's activation the size is set to 0. We hooked up an event to the ToolWindow's size property. Before the window opens it is fine. Then upon activation it turns to 0 then finally when the window shows up it has the same size as before.

Do you have any code that sets the control size to 0 that you could remove?

thanks,
Jake
Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Jake,

I don't think we do anything that explicitly sets the tool window size to 0 while displaying it (other than if it is an auto-hide window being expanded).

Could you possibly do this... attach to the tool window control's Resize event and in your event handler, if the Size is > 0, set your control to the size of the tool window's client area. Otherwise, make it a minimum of 1x1 pixels or more if needed? You'd have to not use DockStyle.Fill and use DockStyle.None if you try this.

Let me know if that helps.


Actipro Software Support

The latest build of this product (v24.1.0) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.