So? There's loads of software that supports XP. Fact of the matter is that XP is deprecated. Obsolete. Microsoft has ended support for it completely. We must not try to make things work on XP. If it just so happens to work on XP, grats. But please stop putting effort in an OS that is almost 17 years old.Usher wrote: 2019-02-20, 13:16 UTC Windows XP is still supported by MS Visual Studio (after installing XP toolset).
How about a dark GUI for TC?
Moderators: Hacker, petermad, Stefan2, white
Re: How about a dark GUI for TC?
Total Commander 11 on Windows 10
Re: How about a dark GUI for TC?
I don' understand your aggression. I'm talking about facts rather than about biased opinions and Microsoft FUD:
- If anything is still in (common) use, it means that it's still useful, no matter how you call it.
MS-DOS is still in use. Disgusting, isn't it? ;-P - If you want to present consistent opinions, you should mention that Total (Windows) Commander is as old as MD-DOS and is also still in use.
It's complete madness, right? - (My opinion) I'm pretty sure you will soon start to seed similar FUD about Windows 7 like MS marketing stuff or paid MS advocates do…
(Fact) But if it ain't broke don't fix it. - Most people don't need a laser gun to kill mosquitoes. They don't start to build laser fences because you said so.
- If you don't like Windows XP, just make your own way and let other people live on their own.
The former is your own choice, the latter is none of your business.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How about a dark GUI for TC?
Microsoft still keeps XP patched for paying business customers by the end of 2019. Furthermore, XP isn't a security risk if the computer isn't connected to the Internet. I know of some companies who still run machines with DOS(!) computers. That's why I continue to support even Windows 95 and NT.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: How about a dark GUI for TC?
If it is of some help: I had some success in taming W10 colors by combining a tool named "Classic Color Panel" and high contrast mode. Usually high contrast mode has nearly no customizability and "Dark Mode" and "Classic Color Panel" alone are simply fully or partly ignored in many applications.
Re: How about a dark GUI for TC?
hi,
my Name is Jimmy.
i'm User of TC and new in this Forum.
as Xbase++ Programmer i just have play with "Classic Panel" Color and many Apps still react on it
hm ... how to include a Snapshot in this Forum
ok found out that i have to use external link for Snapshot.
have read this Thread only so excuse if someone else have point to it before
---
there are 2 API Function
but new Color Value will NOT store into Registry so after re-Login all Color are default like before
---
TC and many other Apps will react on new Color but some Controls like WC_TOOLBAR/WC_REBAR or WC_TABCONTROL are not include in this 30 COLOR_* Constant ... simply "to new"
i have enhance my own native Control to support Ownerdraw/Customdraw.
now i got 99% on my Way to Darkmode. only Scrollbar of WC_LISTVIEW still have System Theme Color
my Name is Jimmy.
i'm User of TC and new in this Forum.
as Xbase++ Programmer i just have play with "Classic Panel" Color and many Apps still react on it

hm ... how to include a Snapshot in this Forum

ok found out that i have to use external link for Snapshot.
have read this Thread only so excuse if someone else have point to it before
---
there are 2 API Function
Code: Select all
https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getsyscolor
The function returns the red, green, blue (RGB) color value of the given element.
Code: Select all
https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-setsyscolors
using API Function "SetSysColor" you can set those 30 COLOR_* Constant from WinUser.H which are the same used by "Classic Panel"An array of COLORREF values that contain the new red, green, blue (RGB) color values for the display elements in the array pointed to by the lpaElements parameter.
but new Color Value will NOT store into Registry so after re-Login all Color are default like before

---
TC and many other Apps will react on new Color but some Controls like WC_TOOLBAR/WC_REBAR or WC_TABCONTROL are not include in this 30 COLOR_* Constant ... simply "to new"
i have enhance my own native Control to support Ownerdraw/Customdraw.
now i got 99% on my Way to Darkmode. only Scrollbar of WC_LISTVIEW still have System Theme Color

Re: How about a dark GUI for TC?
As far as I know Total Commander is built in Delphi.
Modern Delphi environment support so called VCL styles. It is very easy to add support for it and effects are very nice.
Example: http://www.meggamusic.co.uk/shup/1553766547/ddd.png
You can create own styles. You can edit existing ones.
It can be added to application build in Delphi with few lines of code. Take a look at this pseudo-code:
Carbon style is default Delphi style. It can be added to app using single line in .rc file for resource compiler.
-Pawel
Modern Delphi environment support so called VCL styles. It is very easy to add support for it and effects are very nice.
Example: http://www.meggamusic.co.uk/shup/1553766547/ddd.png
You can create own styles. You can edit existing ones.
It can be added to application build in Delphi with few lines of code. Take a look at this pseudo-code:
Code: Select all
var
sStyleName : string;
begin
// Styles Manager
sStyleName := '';
if OPTION_THAT_ENABLE_DARK_MODE = True then
begin
for sStyleName in TStyleManager.StyleNames do
begin
if sStyleName = 'Carbon' then
begin
TStyleManager.TrySetStyle('Carbon');
Break;
end;
end;
end;
//TStyleManager.SetStyle(TStyleManager.SystemStyle); --> this sets back standard windows style
end;
Code: Select all
CARBON VCLSTYLE "Carbon.vsf"
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How about a dark GUI for TC?
Unfortunately I'm not using modern Delphi. I use Delphi 2.0 for 32-bit (heavily modded for Unicode support) and Lazarus for 64-bit (at the time I ported to 64-bit, there was no 64-bit Delphi). I have tried to convert to a newer Delphi, but it's impossible because it handles Unicode differently.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: How about a dark GUI for TC?
hi,
Question : did Delphi 2.0 have Ownerdraw/Customdraw
btw. Color of WC_TOOLBAR come from WC_REBAR as Parent
so i like to request a Rebar if possible.
Question : can you use SubClassing with Delphi 2.0
---
if someone want to read more about Windows Control and play with it try this
https://docs.microsoft.com/en-us/windows/desktop/controls/control-spy
! Note : Control Spy 2.0 from MSDN link seems not to work any more
like your Delphi 2.0 for 32-bit i'm stuck on Xbase++ 32bit

Question : did Delphi 2.0 have Ownerdraw/Customdraw

btw. Color of WC_TOOLBAR come from WC_REBAR as Parent
so i like to request a Rebar if possible.
Question : can you use SubClassing with Delphi 2.0

---
if someone want to read more about Windows Control and play with it try this
https://docs.microsoft.com/en-us/windows/desktop/controls/control-spy
! Note : Control Spy 2.0 from MSDN link seems not to work any more

Re: How about a dark GUI for TC?
i agree while many Apps using Manifest to enable visual Style so you did not see the Colorsmartwork wrote: 2019-03-27, 11:22 UTC"Classic Color Panel" alone are simply fully or partly ignored in many applications.

it work e.g. in Notepad Background Color and also in Menu of FF 66.02 so there are still a lot of Controls used in modern Apps
---
"DarkMode" work IMHO different from normal Windows Theme.
as i understand old Style is using GDI32 to paint Controls. next Step was GDI+ but still Desktop Technique.
now you can use a Engine like HTMLlayout ( https://terrainformatica.com/a-homepage-section/htmlayout/ ) and CCS to render Control with Hardware Acceleration.
"DarkMode" seem to use those XML which include those CCS Syntax but i do not understand it.
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How about a dark GUI for TC?
Yes: For Listboxes, Comboboxes etc.did Delphi 2.0 have Ownerdraw/Customdraw
No: For checkboxes, buttons, srollbars (also those in listboxes), tabs etc. For colored tabs, TC lets Windows draw it, and then draws transparent color on top.
TC uses a manifest to draw these elements with the current Windows theme. Is there a way to modify the theme colors somehow? How would you go about drawing dark mode scroll bars, tabs etc.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: How about a dark GUI for TC?
hi,
i guess Listbox/Combobox Ownerdraw Sample are from Charles Petzold "Programming Windows" Microsoft Press
it is hard to enhance Original Xbase++ Controls while Alaska have its own Event Loop so many Windows Event are not available.
i have a Open Source LIB for Xbase++ called OT4XB to Subclass so i can write my own native Controls.
it also have to lot of predefine Windows Structure so i do not have to write it
did Delphi v2.0 have something for SubClass
---
we can make a new Thread "Windows API for Developer" where i can post my Xbase++ Code and try to translate it into Delphi
---
Image: https://www.xbaseforum.de/download/file.php?id=3658
1.) try to modify Original Control using GetWindowLongA() / SetWindowLongA() API from User32.DLL (see Sample)
2.) write own Control with SubClass
---
WC_SCROLLBAR does react on COLOR_SCROLLBAR
Image: https://www.xbaseforum.de/download/file.php?id=3641
Image: https://www.xbaseforum.de/download/file.php?id=3640
Problem of Scrollbar is that it is not always so i have to wait util it appear and try to get its Handle.
WC_SCROLLBAR have Ownerdraw using SBT_OWNERDRAW.
as i say i still work on it and search for a Event which enable Scrollbar.
---
when study those API at MSDN i notice what Controls can do but XbParts do not offer all.
e.g. Checkbox IS a Button so i can use a Button with BS_PUSHLIKE.
funny about same with Xbase++ v1.9x (there is a Version 2.x using HTLMlayout and CCS).Yes: For Listboxes, Comboboxes etc.
No: For checkboxes, buttons, srollbars (also those in listboxes), tabs etc. For colored tabs, TC lets Windows draw it, and then draws transparent color on top.
i guess Listbox/Combobox Ownerdraw Sample are from Charles Petzold "Programming Windows" Microsoft Press

it is hard to enhance Original Xbase++ Controls while Alaska have its own Event Loop so many Windows Event are not available.
i have a Open Source LIB for Xbase++ called OT4XB to Subclass so i can write my own native Controls.
it also have to lot of predefine Windows Structure so i do not have to write it

did Delphi v2.0 have something for SubClass

---
i can explain what Windows is doing but sorry i "speak" only xBase (since > 40 Years) so i do not know if my Xbase++ Code will help.TC uses a manifest to draw these elements with the current Windows theme
we can make a new Thread "Windows API for Developer" where i can post my Xbase++ Code and try to translate it into Delphi
---
as i say SetSysColor() API is to change those Theme ColorIs there a way to modify the theme colors somehow?
Image: https://www.xbaseforum.de/download/file.php?id=3658
2 Way :How would you go about drawing dark mode scroll bars, tabs etc
1.) try to modify Original Control using GetWindowLongA() / SetWindowLongA() API from User32.DLL (see Sample)
2.) write own Control with SubClass
---
WC_SCROLLBAR does react on COLOR_SCROLLBAR
Image: https://www.xbaseforum.de/download/file.php?id=3641
Image: https://www.xbaseforum.de/download/file.php?id=3640
Problem of Scrollbar is that it is not always so i have to wait util it appear and try to get its Handle.
WC_SCROLLBAR have Ownerdraw using SBT_OWNERDRAW.
as i say i still work on it and search for a Event which enable Scrollbar.
---
when study those API at MSDN i notice what Controls can do but XbParts do not offer all.
e.g. Checkbox IS a Button so i can use a Button with BS_PUSHLIKE.
Code: Select all
PROCEDURE PimpMyXb(oObj,lRound)
LOCAL hWnd
LOCAL nStyle
DEFAULT lRound TO .T.
IF VALTYPE(oObj) = "O" // is Object
hWnd := oObj:GetHWnd() // get Handle
oObj:hide()
oObj:useVisualStyle := .F.
// get Control Style
nStyle := @user32:GetWindowLongA(hWnd, GWL_STYLE)
// add Style
nStyle := nOr(nStyle, BS_PUSHLIKE,BS_CENTER,BS_VCENTER)
// set Style
@user32:SetWindowLongA(hWnd , GWL_STYLE , nStyle )
@user32:InvalidateRect(hWnd,1)
IF lRound
MachKreise(oObj)
ENDIF
oObj:show()
ENDIF
RETURN
Re: How about a dark GUI for TC?
Why you do not leave from Delphi 2.0 and do not apply Lazarus/Free Pascal for Total Commander 32-bit?ghisler(Author) wrote: 2019-03-28, 10:25 UTC I use Delphi 2.0 for 32-bit (heavily modded for Unicode support) and Lazarus for 64-bit.
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How about a dark GUI for TC?
TC is much larger with Lazarus. It seems to include a lot of unused libraries.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: How about a dark GUI for TC?
I don't believe the specific programming environment has anything to do with the ability to listen to certain windows API's. It probably doesn't have an easy to use interface for much modern stuff, but you're free to create hooks into "unknown" API's, right?
Total Commander 11 on Windows 10
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How about a dark GUI for TC?
In principle, yes. But colors in controls can not be changed, they are part of the current theme. The only alternative would be 100% owner-drawn control like the Windows apps use.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com