I have a number of applications which I cannot modify(no source), they are hard coded to draw at 0,0. Normally this is not a problem however a new project(kiosk) has come along where I need to draw a boarder around the outside of these applications. I am looking for a way to change display range from:
X: 0 to 1200
Y: 0 to 900
to something like:
X: -100 to 1100
Y: -100 to 800
I've seen a couple functions on MSDN like SetViewportExtEx, SetWorldTransform which fit the need however if I understand them correctly they don't do a system wide change. They are for the current process only.
I am programming in C++ but if there are settings in the registry/control panel/etc that would also work.
Has anyone else done anything like this before?
Edit 1: Window position is hard coded to 0,0
This might be overkill, but if it's something you really want to have complete control over, you could always use API hooking to intercept the Window creation by hooking CreateWindow, CreateWindowEx in the target process and altering the X Y coordinates before passing control back to the system.
Popular API hooking libraries include: Microsoft Detours, Madshi's madCodeHook, and the free, open source EasyHook.