../Msgboard/General customization/WindowMetrics... Are we missing something?Home
WinT - 17 Aug. 2003 - 12:30:

WindowMetrics... Are we missing something?

And that's just the question I continuously ask myself over and over again, are we missing something?

Here's the thing...

I was browsing through the reg earlier, and of course, checked out the WindowMetrics key, and it just kills me how it's just right there, staring you in the face, but it seems to be limited to the point of no return.

Displayset, great app it is, and I use it for not only colors, but to adjust the sizes of my Window components as well. As you've all seen from my desktop shots, I like everything to be small, as small as it will go.

If looking under the WindowMetrics key however, the for example, MenuHeight and MenuWidth, are both set at "-180". I changed this to several different values over the course of an hour or so, restarted every time, never saw one single change.

Then, I removed the - from the values, assuming that the "-" is used to represent a "negative" value, and set it to 10, just to see what it would do, and still nothing. Now, the interesting thing is, is that all the - values would always change back to -180, every time, but, once the - is removed, it stays at 10, and is in fact, at 10 right now, but no change.

Also, I deleted the BorderWidth value to see what the reaction would be, but no change there either. The borderwidth value is still gone though, it did not come back, but, I've still got borders around my windows. Now if the damn key isn't there, how's it working? lol I'm sure it's some sort of "code" related thing, but I would have at least appreciated an error message or something.

Oh well, I'm just rambling on here, but I'm just wondering if anyone has ever really messed with this stuff? What are we missing? There HAS to be more that we can do. I'de like to make everything even smaller then it already is, especially toolbars, the address bar, etc... and I'de like to have no borders around windows. It would SEEM as if the WindowMetrics key would be the place to go to achieve such basic things, but I suppose not.

Again, just rambling, but would love to get a collaborative effort going on this with everyone. Someone is eventually bound to tap into something at some point :)
 
17 Aug. 2003 - 13:45 joh6nn
the registry is a repository for values not just for windows, but for all kinds of programs and code. so although the registry holds those values, how they are interpreted is up to the program. as often as not, if windows can't find a value in the registry, it uses a default value stored in the actual code of the OS. also, there are occasionally minimum and maximum values that the code will allow.

VP already has a pretty good list of what's going on in the Windows Metrics: http://www.virtualplastic.net/html/desk_reg.html#metrics

you know i love to mess around in the registry, so if you've got any more questions or what have you, you know where to find me
 
17 Aug. 2003 - 17:21 sen
i infected WinT with this BorderWidth thing.
i felt there should be some min/max values for these entries but it's so hard to believe we can set only the colour of the ButtonShadow, ButtonDkShadow, ButtonLight and ButtonHilight entries but we can't hide them. i know, i know. skinner utils are able to hide them with transparent bitmaps...
once upon a time i tried ShellWM with a so-called borderless skin. there were 1 pixel border. but. there are websites with css code portion that is able to hide that inner (?) shadow,light,etc or the 1pixel border of the windowframe (internet explorer).
for example: http://www56.tok2.com/home/susumu/index.html - you'll see there is thinner windowborder.

and there is a themeui reshack to enable 'borderless' explorer windows when folder tasks are enabled.

so what? :D

and don't forget, i'm just looking for this stupidity because i use a 3rd party app that is able to move/resize windows with alt+click. afaik borderless windows are not resizeable with mouse.
 
17 Aug. 2003 - 17:28 WinT
Interesting page indeed, had never seen that one in all my time of being here, strange. I wouldn't have even posted this thread has I known about that page, only because that proves that my question "has anyone messed with this stuff before?" is answered in full :)

Oh well, just seems like there should be more, something secret, hidden, never done before, but maybe not.
 
17 Aug. 2003 - 17:35 sen
i edited my post. and this page is not special. there are a lot of pages with this css code - of course there are.

i think maybe not. windows is just windows - it's not as complex as the universe :)
 
17 Aug. 2003 - 17:42 sen
sorry for 'double' post but i wanted to ask again:
is this community connected to the msdn network? couldn't the ppl @ msdn answer some of our questions?
 
17 Aug. 2003 - 18:12 WinT
No, no one is "connected" to MSDN, and could the people there answer some of our questions? Well, I'm very sure that they could, without a doubt, afterall, is is MS, however, I highly doubt anyone from MSDN would respond to any emails requesting information on how to manipulate the OS which they developed :) It just doesn't work like that, at least, not that I know of anyway.
 
18 Aug. 2003 - 00:01 methodik
heh.

just doing soem catch-up here, and the phrase 'connected to MSDN' made me chuckle. after some of the UI guidelines i've read at MSDN, i'm sure even our existance gives ms UI developers headaches...
 
18 Aug. 2003 - 00:40 WinT
Yes, exactly meth, they probably really don't care for us all that much. lol
 
18 Aug. 2003 - 01:07 sen
well... don't eat me, guys. my english is not perfect - i'm from eastern europe. i couldn't find a funny word.
but imagine a situation: year 2000 or before (release of displayset) and you want to change the 3D look on windows. you ask a guy at ms devnetwork about it and he (or she) replies: "oh, yeah. we didn't think it might be important or interesting for any person, here's the solution: ***** "
 
31 Aug. 2004 - 01:23 sen
Welcome back! :-)

I investigated on this borderless thing.
The SetWindowLong Function could help.

Something like this:
SetWindowLong(hWnd, GWL_STYLE, GetWindowLong(hWnd, GWL_STYLE) & ~WS_BORDER);

But it doesn't work for all windows without a .dll that intercepts window creation messages.

If there's a c++ developer reading this thread and would help me to try coding this small app (because i'm an absolute beginner), please reply!
 
01 Sep. 2004 - 07:47 methodik
i've played with setwindowlong() on my own applications many times, and had been quite excited the first time i saw that API function, thinking I could simply apply it to all windows. sadly, not the case, as I'm sure you've found out.

the trick is that you have to be hooked into the window's process in order to use that particular API on that window. you are correct in that you need a .dll to do this.

prehaps grigri, if he's around, could shed more light on what's needed, and if it would even be workable.

a downside of this though is that you not only lose your border, you lose the titlebar and control buttons as well...

 
01 Sep. 2004 - 10:08 grigri
Well, I do know the SetWindowLong() function quite well, having used it in many applications.

There are 2 main parameters to change for window appearance/borders - GWL_STYLE and GWL_EXSTYLE. All of the bitflags are documented in msdn, it's just a question of looking them up. Some of them aren't very helpful though.

Calling SetWindowLong() with either of these flags does not require being in the same process, unlike the flag GWL_WNDPROC (used for subclassing). However, for certain windows, some styles can only be changed when the window is being created. An example of this is the ES_MULTILINE style for text boxes. The other problem is that all windows can trap the WM_STYLECHANGING and WM_STYLECHANGED messages and effectively block any attempt to change their style bitflags (although this isn't standard practice).

Basically, the best way I have found to remove borders from windows, while keeping the titlebar, is to write/use a skinning program such as ShellVM - which can set the border to anything you like, including a single pixel black line [my favorite] or nothing at all.

For anyone wanting to take this route, the CustomEyes and ShellVM source code are out there [c and c++], although most of the comments are in French and the program flow isn't obvious unless you more or less know how to do it anyway. There is however an excellent window skinning tutorial/source code, in VB, here, but this only deals with subclassing a window in your own process.

Basically, read the VB article and browse the well-commented source code to find out how to skin your own window. Then find the simplest possible example of subclassing foreign windows [probably iconizer, but their may be others], and merge the two. As with all subclassing programs, (1) Save often and (2) Expect crashes, they happen.
 
02 Sep. 2004 - 04:13 methodik
ha, and here i thought you had to be in the same process...

once again, grigri's kung-fu shines. :)

i've played with that vbaccelerator code a few times and found it to be rather interesting, and have also been over the code for shellwm in particular. a little out of my league, i guess, either that or it just requires more patience than i normally have. :)



 
05 Sep. 2004 - 06:40 sen
well, The idea was to make borderless classic look (without ShellWM and other skinutils).
however, I think it's not possible to make absolute 0 pixel borders (or transparent borders) with ShellWM.
But the whole situation is very funny. As Floyd (author of ShellWM) told me: "You simply cannot work around every single problem [...] when the system is throwing stones in the way".

Thanks for your posts.
 
06 Sep. 2004 - 11:57 grigri
It *is* possible, it's just not easy :)

It will however require programming. The registry just doesn't have the options necessary to accomplish what you want. It doesn't mean you'll have to re-write ShellVM though, it's not that extensive.

Write a simple dll that starts/stops a system-wide hook (WH_CALLWNDPROC should do). Inside that, check only for WM_NCPAINT messages. This is the message that requests drawing of the window frame. The wParam of this message is a handle to the "update region". Based on the physical border width [ use GetSystemMetrics() ] create a region that contains the window but NOT the border (a simple rectangle). Then convince Windows to use this region instead of its own for the update (possible methods: directly swap the variables; assign your new region to the old one using CombineRgn(); cancel the original message and post your own; or temporarily set the window region to yours using SetWindowRegion() [there's a difference between a Window Region and a Window Update Region], and no border will be drawn.

Of course, when you start the hook you'll have to tell every window on the screen to redraw itself completely, to get rid of the already-drawn borders.

Obviously, there's a bit more to it that this; you need to filter for windows that already don't have a border, detect whether it's a thin or thick border and use the correct measurements, etc... but that's the main gist of it.

The advantages of this method:
* no subclassing of all windows [like ShellVM does], so less messy, especially at teardown
* no cross-process memory is required
* is very fast and efficient, no real graphics routines

So give it a try!
 
06 Sep. 2004 - 13:37 sen
I'm afraid it's too complicated for me. Thank you for the well-explained post. I'll try to find developers helping me or take this information for future reference. But actually i lost something (appetite?). I'm afraid of making it.
Maybe it would be easier to pay M$ and make them provide an update for Windows where borders and other styles are customizable directly from the Display Properties panel. :-)
 
11 Sep. 2004 - 17:22 sen
Excuse me i don't leave this topic die...
Sorry, now i'll write down everything without think about it:

I gave up. It's impossible to hide the borders on all Windows.
First most windows has a sizebox thickframe, then they have a 1pixel border, they have two 1 pixel lines (in the client-aera??) those are stands for 3Dbordershadow and 3Dborderdarkshadow, then there are the 3Dborderlight and 3Dborderhilight on each window (we can set the color of these 3Dthings with 3DCC or DisplaySet). And i recognized there is another 1 pixel line near to the border that belongs to the non-client area - basically it should be the frame of the window.

It equals 2+2+1+1(+1) but in practice it's 'only' :) 6 pixel wide - maybe because the sizebox is not a separate 'thing' - it should be the whole borderarea.
I don't know.. i'm dumb.

image.

description:
red=3DLight
yellow=3DHiLight
blue=WindowBorder
green=3DObjectFace(windowFrame?)

purple=3DShadow
black=3DDarkShadow
 
11 Sep. 2004 - 17:40 methodik
i just caught up on this thread - thanks sen, for bumping it - and downloaded the source to iconizer. that's not too difficult, and based on the description you gave, grigri, might be possible to do something with...
 
11 Sep. 2004 - 19:39 sen
ok :)

But i'm really sorry bumping this thread because it seems this issue is not as important as others on VP.

Well, it's quite interesting. For instance there's Aqua-Soft.org as a base of MacOSX-look for Windows but they aren't too excited when Brad Wardell from Stardock announces that it would be possible to implement into WB (per-pixel?) transparency-features even if it would mean smooth rounded corners for their Windows-skins to mimic (almost) perfectly the MacOSX-look (and even if it could help refreshening their community because AS.org has almost died).

BTW, it's not the same here but i think we strive to make our desktops as minimal as possible, don't we?
Maybe this borderless thing is just stupid. Maybe because it wouldn't be possible to easily resize the windows without a 3rd party app (like WinMover).

Maybe because i waste too much freetime finding an answer. :)
Sometimes i become a child again. Stop.
 
11 Sep. 2004 - 19:48 methodik
man - don't worry yourself - this forum is dedicated to customizing our desktops in any way possible. to me, at least, stuf like removing the borders is major customization, and highly desired. :)

the only problem is that when we start talking about solutions to things via coding, there's not too many that are able to implement those solutions themselves until those of use who code can produce something for them to use and enjoy.

which really, is the part of desktop customization that i enjoy the most - coming up with solutions or new ideas based off of what might not have been done before, and then making those ideas or solutions available to everyone else. :)
 
12 Sep. 2004 - 12:19 sen
lol. I was always proud of my talent in using Goooooooogle :)

AlphaV 1.7 - This program allows changing extended attributes of windows and automatically does some actions using system of saved rules. Initially designed for enable alpha blending, it could control almost all interesting attributes (including hide borders, etc) of XP?s windows.

download AlphaV17.zip [1MB] (zipped - no installer)

This software is quite good! Try it! (2k/XP only :( )

But it's rather funny because today this app was listed on shellcity.net toooooo. :)


My observations:
If you click the general tab, you can untick
  • "Dialog frame" to get rid of the 3Dlook of the Windowframe;
  • "Sizable" to get rid of the sizable frame of the window;
  • "With Border" to get rid of the border (and yes.. the caption - aka titlebar - too).

    Now the problem is if you untick "Sizable" then you won't be able to resize your window even if you use the unix-like WinMover (alt+mouse)!!! :(

    And even if you untick all of the three attributes there'll remain a pixel frame around windows.

    Quite interesting, huh?
  •  
    12 Sep. 2004 - 14:21 sen
    If you want to see a real borderless window, run IE and deselect "Dialog frame", "Sizable" and "With Border" in AlphaV then open this url. This is a hungarian hardware and software news website that contains a CSS (Cascading Style Sheets) code in its source.

    The css code looks like this:

    <STYLE type="text/css"> BODY { margin-top: -8px; margin-left: -8px; margin-right: 0px; margin-bottom: 0px; padding-top: 0; padding-left: 0; padding-right: 0; padding-bottom: 0; border-top: 0; border-left: 0; border-bottom: 0; border-right: 0; width: auto; } </STYLE>
     
    Please log-in to post.
    You need to be logged in to post. To log-in, or to register an account go -there.
     
    Options
    Login | Help | Profile | User list | Display last  
     days 


    ../Msgboard/General customization/WindowMetrics... Are we missing something?Top

    xhtml 1.1