PDA

View Full Version : Resizing windows


remot
03-19-2006, 07:39 PM
I have found software that lets you resize non-resizable windows, but there's a problem. It cuts off the stuff in the window, so now my window will be the proper size, but all it did was "hide" the rest. Did that make sense?

Anyways, I was wondering if it would be possible to alter the code of these programs (if attainable) so that it resized the window and kept everything in the window.

TIA

SamIAm
03-19-2006, 08:33 PM
[ QUOTE ]
I have found software ...
the code of these programs ...

[/ QUOTE ]Can you give us a hint as to what software you're talking about? /images/graemlins/smile.gif It's a little hard to gauge without anything more specific.
-Sam

PokerSlut
03-19-2006, 09:13 PM
Unless the software for the window you are trying to resize is developed to handle window resizing, then the answer will always be "no". And, if it handled window resizing in the first place, you probably wouldn't need another program to hack around it.

jukofyork
03-19-2006, 09:19 PM
[ QUOTE ]
[ QUOTE ]
I have found software ...
the code of these programs ...

[/ QUOTE ]Can you give us a hint as to what software you're talking about? /images/graemlins/smile.gif It's a little hard to gauge without anything more specific.

[/ QUOTE ]
In theory an application could be written which allows any window to be re-sized (using WM_PAINT hooks [+others], StretchBlit() and some kind of linear filtering). I never seen anything like this yet, and had looked into this long before party decided to resize windows, but never got round to trying to code it up.

I also wondered if an application existed which allowed for virtual desktop resolutions (nearest I found was to use a remote login program [I forget the name], but it didn't work well).

What you describe sounds like an app which can re-size the window, but not the client area (very easy to write, but not much use sadly). /images/graemlins/smile.gif

Juk /images/graemlins/smile.gif

remot
03-19-2006, 10:48 PM
[ QUOTE ]
[ QUOTE ]
[ QUOTE ]
I have found software ...
the code of these programs ...

[/ QUOTE ]Can you give us a hint as to what software you're talking about? /images/graemlins/smile.gif It's a little hard to gauge without anything more specific.

[/ QUOTE ]
In theory an application could be written which allows any window to be re-sized (using WM_PAINT hooks [+others], StretchBlit() and some kind of linear filtering). I never seen anything like this yet, and had looked into this long before party decided to resize windows, but never got round to trying to code it up.

I also wondered if an application existed which allowed for virtual desktop resolutions (nearest I found was to use a remote login program [I forget the name], but it didn't work well).

What you describe sounds like an app which can re-size the window, but not the client area (very easy to write, but not much use sadly). /images/graemlins/smile.gif

Juk /images/graemlins/smile.gif

[/ QUOTE ]

Yeah, there's not much use when it just "hides" what you resized. Just to make sure I'm understanding you, you said the program I'm talking about is easy to code, right?

I'll look for the link.

remot
03-19-2006, 11:00 PM
The link is here (http://www.brianapps.net/)

The program is called "sizer" and is at the bottom.

jukofyork
03-20-2006, 01:58 AM
[ QUOTE ]
Yeah, there's not much use when it just "hides" what you resized. Just to make sure I'm understanding you, you said the program I'm talking about is easy to code, right?

[/ QUOTE ]
Yes, if you just want to set a window to a predetermined size (without scaling the contents to fit), then it is very easy to do (only a few lines of code). If you want to scale the contents then it is much harder, and likely quite a big job to do.

Juk /images/graemlins/smile.gif

remot
03-20-2006, 02:16 AM
[ QUOTE ]
[ QUOTE ]
Yeah, there's not much use when it just "hides" what you resized. Just to make sure I'm understanding you, you said the program I'm talking about is easy to code, right?

[/ QUOTE ]
Yes, if you just want to set a window to a predetermined size (without scaling the contents to fit), then it is very easy to do (only a few lines of code). If you want to scale the contents then it is much harder, and likely quite a big job to do.

Juk /images/graemlins/smile.gif

[/ QUOTE ]

Do I have a volunteer? /images/graemlins/grin.gif

jukofyork
03-20-2006, 02:42 AM
Whats wrong with the sizer application you posted a link to? /images/graemlins/smile.gif

Juk /images/graemlins/smile.gif

remot
03-20-2006, 03:03 AM
It doesn't scale the contents....

jukofyork
03-20-2006, 03:07 AM
Oh, sorry. I played too much poker today and brain not working! /images/graemlins/smile.gif

I will look into this if I get time as it would also be helpful to me, but it is a pretty hard/big project to do (like I said I thought about this a while back) and not sure how long it will take for me to get around to having a shot at it (sadly, I have a never ending queue of projects to work on and never enough time to do them all).

Juk /images/graemlins/smile.gif

PS: I have a feeling somebody will have done something like this before, its just finding it that's the hard bit... /images/graemlins/smile.gif

remot
03-20-2006, 03:10 AM
Thanks for the semi offer. I have some programming experience, but nothing (that I know of) that would relate to doing something like this. Even if you don't get around to it, but find some kind of tutorial or reading I could do to figure this out, I'd be happy to try and learn it.

jukofyork
03-20-2006, 03:59 AM
[ QUOTE ]
Thanks for the semi offer. I have some programming experience, but nothing (that I know of) that would relate to doing something like this. Even if you don't get around to it, but find some kind of tutorial or reading I could do to figure this out, I'd be happy to try and learn it.

[/ QUOTE ]
BitBlt (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_0fzo.asp) & StretchBlt (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_9cok.asp) for bitmap copying (you may also want/need to hook these depending on how the application works [ie: purely graphical]).

Bilinear filtering (http://en.wikipedia.org/wiki/Bilinear_filtering) will help smooth out re-sized images (also look for Bi-cubic filtering).

The most likely message you will be hooking (http://www.codeproject.com/system/hooksys.asp) is WM_PAINT (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/pantdraw_1xd1.asp) which triggers every-time a window is to be updated (but if you really lucky might just be able to hook BitBlts going from the (real) window's Back-Buffer [assuming its purely graphical]).

Most likely you will need to make a re-sized 'fake' window with the same title/properties. Then you will hook every WM_PAINT message from the real window (which u will have to hide and still force it to update somehow [via invalidation possibly - see InvalidateRect (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/pantdraw_7ano.asp)]), and then do a BitBlt or StretchBlt into your new re-sized window (using some kind of filtering/re-sampling to smooth out the new image).

There's most likely a lot more to it than just this, but this will give you a start. /images/graemlins/smile.gif

Juk /images/graemlins/smile.gif

remot
03-20-2006, 11:28 AM
Yikes, from the looks of all that it would save me time/money to just by a monitor with 1600 X 1200.

smoore
03-20-2006, 01:05 PM
[ QUOTE ]
[ QUOTE ]
Thanks for the semi offer. I have some programming experience, but nothing (that I know of) that would relate to doing something like this. Even if you don't get around to it, but find some kind of tutorial or reading I could do to figure this out, I'd be happy to try and learn it.

[/ QUOTE ]
BitBlt (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_0fzo.asp) & StretchBlt (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_9cok.asp) for bitmap copying (you may also want/need to hook these depending on how the application works [ie: purely graphical]).

Bilinear filtering (http://en.wikipedia.org/wiki/Bilinear_filtering) will help smooth out re-sized images (also look for Bi-cubic filtering).

The most likely message you will be hooking (http://www.codeproject.com/system/hooksys.asp) is WM_PAINT (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/pantdraw_1xd1.asp) which triggers every-time a window is to be updated (but if you really lucky might just be able to hook BitBlts going from the (real) window's Back-Buffer [assuming its purely graphical]).

Most likely you will need to make a re-sized 'fake' window with the same title/properties. Then you will hook every WM_PAINT message from the real window (which u will have to hide and still force it to update somehow [via invalidation possibly - see InvalidateRect (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/pantdraw_7ano.asp)]), and then do a BitBlt or StretchBlt into your new re-sized window (using some kind of filtering/re-sampling to smooth out the new image).

There's most likely a lot more to it than just this, but this will give you a start. /images/graemlins/smile.gif

Juk /images/graemlins/smile.gif

[/ QUOTE ]

My head asploded!

Mogobu The Fool
03-20-2006, 04:52 PM
Also, if you mean to INTERACT with said window, you need to write code to capture mouse clicks on the mini-window and relay them to the appropriate coordinates of the real window.

Get the monitor, unless your real goal is to learn to code this kinda stuff. /images/graemlins/smile.gif

jukofyork
03-20-2006, 07:56 PM
[ QUOTE ]
Get the monitor, unless your real goal is to learn to code this kinda stuff. /images/graemlins/smile.gif

[/ QUOTE ]
Yes, I agree with Mogobu. This is no mean feat for even an experienced low-level programmer (it is possible, but it is a heck of alot of work). /images/graemlins/smile.gif

Juk /images/graemlins/smile.gif