How do I get window sizes bigger than my screen size?

Started by
8 comments, last by Nik02 19 years, 4 months ago
Hi guys! Im new to this forum and am quite new to DirectX. My problem now is this: I need a DirectX application that has a size bigger than the size of my screen. How can I get that? I tried the following: g_D3DSettings.m_nDeviceWidth = 1280; g_D3DSettings.m_nDeviceHeight = 1280; res = InitDirect3DDevice(hWnd, TRUE, g_D3DSettings, g_pD3D, &g_pDevice); Additionally I tried to take care of that in the Windows CreateWindow() function like that: g_hWnd = CreateWindow(strAppname, strAppname, WS_OVERLAPPEDWINDOW, 0, 0, 1280, 1280, NULL, NULL, wc.hInstance, NULL); But unfortunately my application crashes with an error that sounds like I havent got enough memory for the screen buffer/back buffer.... What can I do to get this running? Thx in advance, Nick.
Advertisement
You have registered the window class, haven't you?
Generally, 3d adapters only support an array of pre-determined fullscreen resolutions, that can be retrieved by using methods of the IDirect3D* interface. Furthermore, I can imagine that Windows isn't too happy about the window being larger than the screen in the first place, whether or not you use d3d!

What are you trying to accomplish?

Niko Suni

Oh yeah, I forgot about that. Most cards won't do 1280x1280.. 1280x960 or 1280x1024 is more normal, and more people's monitors will support it.

As for device windows being larger than the desktop resolution, windows xp doesn't seem to mind for me.
Quote:What are you trying to accomplish?


I need a DX window that is quadratic and bigger than the screen (resolutions >= 1280x1280).

To the other poster: Yes I registered my window class. Furthermore I found the place where i initialize the size of my backbuffer and tried to adapt that as well, but it still didnt work:

d3dpp.BackBufferWidth = 1280;
d3dpp.BackBufferHeight = 1280;
Quote:Original post by MrEvil
Oh yeah, I forgot about that. Most cards won't do 1280x1280.. 1280x960 or 1280x1024 is more normal, and more people's monitors will support it.

As for device windows being larger than the desktop resolution, windows xp doesn't seem to mind for me.


1024x1024 would be fine too. Besides that, my DX application is running in full screen mode, thus it's not that much a Windows thing, but actually only a DX thing. If DX could display fullscreen applications with such a resolution, I'd be happy :).

Anyone knows how this can be done?
1024 x 1024 might be possible. I suppose it depends if the user of the program has configured their system properly. E.g. my monitor doesn't report that it can do 1024 x 1024, although it is perfectly capable of doing so, and I've had to use the nVidia control panel to add the 1024x1024 resolution.
It probably can't be done. When I was working with DirectX, you could enumerate all resolutions your graphic card supports. Unless you pick one of those, it will never work. I assume this facility is still there. However, I would be really surprised if any standard consumer card supported square resolutions like that.

All in all, I'm rather at a loss why you would need this. Your monitor wouldn't be good at displaying those resoultions anyway. Unless your monitor can display things with an aspect ratio of 1:1 (which would surprise me too for standard hardware), you would be unable to display a resolution like that anyway.

Why don't you just do what people usually do when they have to display something that is bigger than the screen? Either pick the lowest resolution that can completely contain your square and render appropriate black bars on the sides, or implement some kind of scrolling and render only those portions which are currently visible.
Quote:Original post by MrEvil
1024 x 1024 might be possible. I suppose it depends if the user of the program has configured their system properly. E.g. my monitor doesn't report that it can do 1024 x 1024, although it is perfectly capable of doing so, and I've had to use the nVidia control panel to add the 1024x1024 resolution.


Are we talking about an actual resolution of 1024x1024 or about some kind of virtual desktop?
It may be suitable for your purposes to create a render target texture the size of your needs instead of trying to force the primary framebuffer to a size that the card/monitor cannot support.

I assume that you need the data at the size you mentioned for offline processing. If this is not the case, you can still use the scene texture for normal rendering, using the actually supported backbuffer sizes.

EDIT: It should be mentioned, that any "DX thing" is very closely related, if not identical, to "Windows things". Resolution support is a hardware issue at heart, and both GDI and D3D both have to live with those.

Niko Suni

This topic is closed to new replies.

Advertisement