user1767974
user1767974

Reputation: 31

Render internal windows program in full screen in DirectX/Win API program

I want to make such stuff, where I'll be able to run my internal programs in Windows like cmd.exe in a full screen mode.

Earlier, in Windows XP I could use cmd.exe in a full screen mode using Alt + Enter, but from Windows Vista such thing was disabled because of WDDM ( Windows Display Driver Model ).

I think, that the best way to make such thing is: "to make a full screen DirectX/Win API program and then render another internal program in it".

I know how to create full screen programs using DirectX/Win API, but can't imagine how to render another program execution in my full screen program.

Another way is: "just to manipulate with input/output streams with cmd.exe or another internal program and then parse information in a full screen in DirectX full screen program".

What are your suggestions for the such question?

Upvotes: 3

Views: 383

Answers (1)

Goz
Goz

Reputation: 62333

Doing this via DirectX will be a nightmare and insanely complicated.

You are far better off createing a top-most window that is the size of the screen. Its a tiny bit more complicated than this as you will need to add on space for the borders to the window size and then position it very slightly off screen such that only the window itself is visible.

In C/C++ you would do this using the GetSystemMetrics function.

  • SM_CYCAPTION - Is the height of the title bar.
  • SM_CYFRAME - Is the height of a sizable frame.
  • SM_CXFRAME - is the width of a sizable frame.

This would mean you create a window for a 1024x768 screen that has a width/height and its position as follows.

const int cxFrame   = GetSystemMetrics( SM_CXFRAME );
const int cyFrame   = GetSystemMetrics( SM_CYFRAME );
const int cyCaption = GetSystemMetrics( SM_CYCAPTION );

const int winWidth  = 1024 + (cxFrame * 2);
const int winHeight = 768 + (cyFrame * 2) + cyCaption;

const int winPosX   = -cxFrame;
const int winPosY   = -cyFrame - cyCaption;

You now have a window that "appears" full screen which will work on just about any windows system out there and doesn't rely on DirectX and all the other driver based hell that this would introduce.

Upvotes: 1

Related Questions