iDisplayModes question
iDisplayModes question
I've just started checking out madCollection, working thru some of the examples, and am pretty impressed. :)
A question on iDisplayModes: the example works fine on the primary "monitor", but the interface doesn't seem to permit enumeration of other "monitors" (in a multimonitor array) - did I miss something?
And this may be a stupid question, so apologies in advance. :)
Is it possible to "inject" a resolution into the list that Windows returns with EnumDisplaySettings() - one that isn't normally returned by the display driver?
I realize that that might seem like a pointless thing to do, but I have my reasons... I'm just wondering if its possible?
Thanks in advance...
A question on iDisplayModes: the example works fine on the primary "monitor", but the interface doesn't seem to permit enumeration of other "monitors" (in a multimonitor array) - did I miss something?
And this may be a stupid question, so apologies in advance. :)
Is it possible to "inject" a resolution into the list that Windows returns with EnumDisplaySettings() - one that isn't normally returned by the display driver?
I realize that that might seem like a pointless thing to do, but I have my reasons... I'm just wondering if its possible?
Thanks in advance...
Re: iDisplayModes question
I've not yet done anything for multi monitor support. Probably I should, but then I need 2 monitors first...swamped wrote:A question on iDisplayModes: the example works fine on the primary "monitor", but the interface doesn't seem to permit enumeration of other "monitors" (in a multimonitor array) - did I miss something?
Well, you can not really inject a new display mode into the list of display modes, but you can nevertheless work with a new display mode by using the function "DisplayMode". Does that help?swamped wrote:Is it possible to "inject" a resolution into the list that Windows returns with EnumDisplaySettings() - one that isn't normally returned by the display driver?
Code: Select all
function DisplayMode (width : integer;
height : integer;
bitsPerPixel : integer;
refreshRate : integer = 0) : IDisplayMode;
Thanks for the quick reply. That doesn't help, but I'm not surprised. I'm programming the graphics card to a "non-standard" resolution, and I was looking for a way to get Windows to use the resolution. Right now, e.g., if I program the hardware to 1032x776, I just end up with 1024x768 and 8 lines and rows of pixel garbage on screen.
I've just checked. With the NVidia driver you can add custom resolutions. I've tried 1032x768 and it works just fine. I've no idea how to do this programatically, though. I think the NVidia control panel directly talks to the NVidia driver. I'm not aware of any API which would offer this kind of functionality.
I'm sorry to say but I've no idea how that would work.
Well, maybe adding the resolutions to the registry is already good enough? You know there are some registry keys where all the resolution information is listed. If you add a custom resolution there, the driver might accept that. I'm not sure, though.
Well, maybe adding the resolutions to the registry is already good enough? You know there are some registry keys where all the resolution information is listed. If you add a custom resolution there, the driver might accept that. I'm not sure, though.
Thanks for the idea, but I've been down that road already. So I wonder if it is would be possible and suffice to hook the EnumDisplaySettings() API call and modify the result, adding more devmodes?
Probably this is already too late. EnumDisplayModes() is how applications get a list of display modes from Windows. How does Windows get its list? Just musing... :)
Probably this is already too late. EnumDisplayModes() is how applications get a list of display modes from Windows. How does Windows get its list? Just musing... :)
Well, it's no problem to hook EnumDisplayModes and to simulate a new mode there. The real problem is to make the driver display that new mode.
I'd suggest using RegMon and FileMon to see what NVidia's control panel does when you add a custom resolution. If it's only adding some registry keys/values (what I suspect) you should be able to see whether those are NVidia specific or whether they might work with other IHVs, too.
I'd suggest using RegMon and FileMon to see what NVidia's control panel does when you add a custom resolution. If it's only adding some registry keys/values (what I suspect) you should be able to see whether those are NVidia specific or whether they might work with other IHVs, too.