Can you Use Edit Controls and D3D 9 at the same time

Started by
2 comments, last by ValMan 16 years, 10 months ago
Hi all, I can't get the editbox control to render infront of the d3ds Present. doe's anybody know how to do this. The App is currently not a full screen, Is it a focus thing. [Edited by - ankhd on June 11, 2007 11:32:35 PM]
Advertisement
I don't think there is a workable way of getting windows controls to draw over a directx scene. But I would imagine if the scene was drawn in a window control then other window controls would work fine, as per 3D Object programs that are flying about.

The only way you can get user interface functionality, as far as I am aware, in a directx scene environment would be to create your own or use one of the systems designed for this use out there somewhere.
There are a few Graphics User Interface libraries out there that would take care of this for you. At least two are mentioned in last two or three pages of this forum alone. You would have to write your own edit box or decide which of the available libraries best fits your needs.
I am pretty sure there was a way to do this, but I don't remember the details. For one, there is some flag of D3D device (I think you have to set it before device creation) that allows windows to be displayed on top of full screen rendering.

Child controls will probably not be displayed (or else, you would have to repaint them on every frame, and your performance would greatly suffer), but you can make another toplevel window to go directly on top of your rendering window, put all the controls on there, then generate a region for it and set the region, to make all areas of the window without controls transparent. But, that is a lot of work and not very flexible.

So I would, like everybody else, suggest to get or write a DirectX GUI library. In fact, there is one written by Microsoft that comes with SDK.

This topic is closed to new replies.

Advertisement