ʇǝǝๅ ftw could you update the github repo? i'm curious about the systray implementation
It's actually quite weird:
First I get a handle to the systray (just some repetitive getting of child windows)
The object the handle refers to is a Win32 toolbar, so I can use the TB_BUTTONCOUNT message to get the number of buttons
When I know the button count I can loop through button indexes and send the TB_GETBUTTON message to get information about the button. (Way harder then it sounds: TB_GETBUTTON only works if you specify a memory address in the processes memory space, so I first need to allocate memory inside of explorer.exe and then use some more API calls to copy the object into my own processes memory)
When I have the TBBUTTON object, I can use the memory object at the adress specified by dwData to get even more info about the button.
When I have all info required I send it back to CLI which in turns converts them to C# managed objects.
And all of this is implemented in C++ because doing it in C# makes the already complicated code even more complicated. The code will be uploaded later today.
Cool, thanks. I'm working on a Progman.exe replacement (hopefully I'll be able to replicate the entire Win3.1 shell experience). and I'll probably put the systray icons in the status bar to make it a bit more usable as a shell.
veselcraft there's an absolute path in one of the project references, if you change it to a path relative to the solution directory it will compile without errors.
I'm working on a Progman.exe replacement (hopefully I'll be able to replicate the entire Win3.1 shell experience). and I'll probably put the systray icons in the status bar to make it a bit more usable as a shell.
Hmm, the systray doesn't work for me. GetTrayButtonCount always returns 4, no matter how many tray icons I have, and seems like everything in TBUTTONINFO is null after calling GetTrayButton.
The caveats of TB_GETBUTTON:
If the OS (and specifically explorer.exe) is x64, you NEED to compile for x64, same thing for x86.
Tray icons that are inside of the "arrow" menu, are technically hidden, so they won't show up. You have to enable the option "Settings" -> "Personalization" -> "Taskbar" tab -> "Notification area" setting area -> "Select which icons appear on the taskbar" -> "Always show all icons in the notification area"
All icons that are made from within explorer.exe require Shell_TrayWnd to be the foreground window because they're technically part of the taskbar (wifi, sound, eject menu etc. (battery works though?))
Post by Spitfire_x86 on Feb 14, 2020 2:19:58 GMT -8
I decided to try implementing systray from scratch - no Explorer hooks. I created a window with Shell_TrayWnd class and sent a TaskbarCreated message with C++, then redirected all WM_COPYDATA messages to my form in C#. So far I got the icons to display, they don't do anything yet though (and some of them repeat, because I forgot to filter out messages other than NIM_ADD ). There's still a long way to go though, I'll have to handle all the Shell_NotifyIcon messages and input events first before it becomes even remotely usable...
I installed a fresh W8.1 VM and tried it in that too, and I'm getting the same error I'm afraid. Got more information this time:
Problem signature: Problem Event Name: CLR20r3 Problem Signature 01: SimpleClassicThemeTaskbar.exe Problem Signature 02: 220.127.116.11 Problem Signature 03: 5e454e3b Problem Signature 04: SimpleClassicThemeTaskbar Problem Signature 05: 18.104.22.168 Problem Signature 06: 5e454e3b Problem Signature 07: 57 Problem Signature 08: 13 Problem Signature 09: System.TypeInitialization OS Version: 6.3.9600.2.0.0.256.89 Locale ID: 1033 Additional Information 1: 57da Additional Information 2: 57dab08f08c7ee896adcb8f73cb2c69d Additional Information 3: 853c Additional Information 4: 853c4c562aeb60061bd6dbab7dadea7c
As for what icons I use (W10, I never used these on the W8 vm): Volume2, unclicky, Simpletwall, Lightshot, Malwarebytes, 3RVX, WinEject, Classic Task Manager.
Last Edit: Feb 14, 2020 7:33:42 GMT -8 by clasurol
soapmusic27: I have made us a Discord channel: discord.gg/9jtudv Also created a thread about it. I never knew what the Win10 2004 searchbar issue was until just now. For some reason, I am running 2004 with classic theme and the searchbar is unaffected
Sept 24, 2020 20:54:21 GMT -8
Splitwirez: Apparently the Windows XP source code has leaked. Keep your distance, folks.
Sept 25, 2020 0:41:12 GMT -8
ihatemetro: Splitwirez It was? Which Service Pack? To all people, don't use it for making Windows more Classic. Edit: It's SP1 I can tell, and any Windows NT OS older than XP was also leaked. Edit 2: Bits of Windows 10 source code have also been leaked.
Sept 25, 2020 5:36:43 GMT -8
Hayafumi: Well i'm even more scared when 7's will get spilled out on the internet.
Sept 25, 2020 5:38:56 GMT -8
ihatemetro: Hayafumi Oh no, not 7 or Vista. At least people can find a way to get Windows 10 drivers on 7 and still supply security updates, but still it's going to be illegal.
Sept 25, 2020 5:41:12 GMT -8
Hayafumi: Ah, well I will probably switch to 10 and setup Classic Theme or go to Linux pretty soon.
Sept 25, 2020 5:45:12 GMT -8
ihatemetro: Hayafumi That's not even all of it, Windows CE 3-7, Server 2003, and MS-DOS 3.30 and 6, as well as original Xbox source code have been leaked as well. Bits of Xbox one source code have also been leaked.
Sept 25, 2020 6:22:35 GMT -8
Hayafumi: Oh lord, this is the gigaleak like Nintendo but not really.
Sept 25, 2020 6:25:31 GMT -8
ihatemetro: Hayafumi I also saw a tiny bit of Windows 7 source code once too, but it's a tiny bit and not that important, from 2010. Can't tell if it's real or not.
Sept 25, 2020 6:26:55 GMT -8
Hayafumi: There goes another partition on my drive, gonna install either LTSC or LTSB on it.
Sept 25, 2020 13:58:39 GMT -8
ihatemetro: Hayafumi LTSB 2016 is recommended, it supports Classic Theme and has longer support than LTSB 2015.
Sept 25, 2020 14:14:20 GMT -8
Hayafumi: Is kinda of a struggle for me to make Pre-1803 because I can't get everything to start up, but i'll try again.
Sept 25, 2020 15:17:48 GMT -8
Hayafumi: Once again, i'm really new on Classic Theme +8
Sept 25, 2020 15:18:04 GMT -8
Hayafumi: Also, is a struggle finding LTSB 2016.
Sept 25, 2020 19:55:42 GMT -8
Hayafumi: I'm just going with 8.1.
Sept 25, 2020 19:59:41 GMT -8