[TC 8.01] Wrong window-position on 1024x600 screen

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

User avatar
MaxX
Power Member
Power Member
Posts: 1029
Joined: 2012-03-23, 18:15 UTC
Location: UA

[TC 8.01] Wrong window-position on 1024x600 screen

Post by *MaxX »

Wrong window-position on 1024x600 screen
When start-bar is left-sided and up-sided.

Screenshots:
http://iceimg.com/i/f7/d8/f8fe88c86e.gif - goog
http://iceimg.com/i/a9/86/ef7d30780d.gif - good
http://iceimg.com/i/d7/94/312f78ea7d.gif - wrong
http://iceimg.com/i/85/56/ad903d3314.gif - wrong

Please, fix this.

p.s.
When I comment wincmd.ini lines
dx=800
dy=600

I get smaller window, but the same wrong positions.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You can use Configuration - Save Position after moving/resizing window in order to get that position next time.
User avatar
MaxX
Power Member
Power Member
Posts: 1029
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

2MVV
I change screen-resolution too often and have no need to set absolute position for the window, I need it to be centered as it is by default (when not fullscreen).
Last edited by MaxX on 2013-01-13, 18:37 UTC, edited 2 times in total.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Usually I prefer to see TC window in bottom right corner of screen. :)

You should mention that x and y parameters must be removed from wincmd.ini in order to reproduce that bug. I can confirm it with TC 8.01x32 on WinXP.
User avatar
MaxX
Power Member
Power Member
Posts: 1029
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

There's no
x=...
y=...

lines in my config.
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

MaxX,
Yes, but after saving position TC puts them into it and uses them (so bug can't be reproduced).
User avatar
MaxX
Power Member
Power Member
Posts: 1029
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

2MVV
Try to remove this lines from your config or start tc with blank wincmd.ini and you'll be able to reproduce this one.
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

That's what I'm talking about - reproduce conditions should be mentioned. :)
siealex
Senior Member
Senior Member
Posts: 278
Joined: 2009-03-22, 16:36 UTC

Post by *siealex »

Do you use a custom Win7 (or Vista) theme? It seems Windows incorrectly reports the taskbar size.
We are not so S.M.A.R.T. as we imagine...
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

siealex,
I was able to reproduce it using classic theme.
User avatar
MaxX
Power Member
Power Member
Posts: 1029
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

Some more:

Such a wrong position can be reproduced on ANY resolution and ANY windows!
But it becomes most noticeable on low-res screen.
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC is currently centered on the screen, not in the available desktop area. I will check whether I can change that.
Author of Total Commander
https://www.ghisler.com
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

Taskbar is a so-called "Application Desktop Toolbar". There may be more than one such toolbar (registered with SHAppBarMessage API function). To find all of them, you must enumerate all top-level windows with class name "Shell_TrayWnd". Then you can call GetWindowRect for them to determine real available desktop area.
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

2MarcinW

Why so complicated?
MSDN: MONITORINFO

http://ghisler.ch/board/viewtopic.php?p=103317#103317
Still delivers the correct workarea in Windows 7 x64.

Regards
Holger
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

HolgerK, you are right. GetMonitorInfo API function is the best solution for Win98, WinME, Win2000, WinXP and above.

It's not available in Win95 and WinNT4. But in Delphi versions between 5 and 2010 there is a MultiMon unit that solves this problem (by implementing lacking functionality for Win95 and WinNT4). So this unit could be a sample for implementing a workaround in Delphi 2.

Regards!
Post Reply