views:

30

answers:

1

I have run into a weird necessity to make a certain window in the system of a really big height, one that is larger than my display's resolution. I have written a simple WinAPI program that sets a window size by calling SetWindowPos and I have encountered that if the height is greater than current display's resolution, then it is simply set to be equal to screen height.

This is obviously some Windows trick and I am wondering if there is a way to override that and set an arbitrary size for the window.

+1  A: 

You need to implement a message handler for WM_MINMAXINFO.

Hans Passant
Didn't know about that message, thanks! However, I don't own the application whose window I want to resize, so I handling that message is not a solution here.
Corvin
You are making this unreasonably difficult. SetWindowsHookEx is next.
Hans Passant
Thanks for the suggestion. Are you proposing to set a global hook on WH_CALLWNDPROC?
Corvin
That's correct. You need a DLL so that your code can be injected into the process.
Hans Passant