Closed cactysman closed 7 years ago
I'm not a C++ programmer but I still tried to create that feature myself here: https://github.com/Metaa/WhatsappTray/blob/master/WhatsappTray/Hook.cpp
The code of course is messy because of all the debugging but it's just supposed to be a dump of how far I got.
I just couldn't get to the point where I could catch WM_CLOSE
.
I was talking to someone and we came to the conclusion that intercepting the close event is unlikely to be possible without injecting custom code throught something like DLLs.
This tool could be used to replace one of WhatsApps static DLL files (libEGL? it's only 93kb of size) with one that wraps the original DLL and would then add our code to it so that we can intercept the close event internally: https://www.codeproject.com/articles/16541/create-your-proxy-dlls-automatically
I think its not that hard :) I setup my new pc yesterday with vs and only reread the code. Today i will try to implement it.
Wow that is actualy harder than i thought -.- Maybe i give it a another try on the we.
Finaly i found a way to implement this :D Its a bit hackish but who cares als long as it works...
You have to start it with --closeToTray
I will upload a binary soon.
Woah, that works like a charm! Awesome!
Thanks a lot 👍 Finally a reason to use the desktop client.
I just tried --closeToTray but it still closes .. i know this was done in 2017 ..
I just tried --closeToTray but it still closes .. i know this was done in 2017 ..
Never stopped working for me. 😮
I just tried --closeToTray but it still closes .. i know this was done in 2017 ..
Never stopped working for me. 😮
Thanks for confirming, I must be doing something wrong. I will give it a try again later in the week.
Finaly i found a way to implement this :D Its a bit hackish but who cares als long as it works...
You have to start it with --closeToTray
I will upload a binary soon.
Can you explain how you did? What am I supposed to change and where?
Rightclick on the tray-icon and activate "close to tray"
Pretty simple. Catch the closing event and just minimize the app. Could be a setting or something.
I'm used to clicking X on apps like Discord or Steam because they still keep running afterwards. WhatsApp just closes which is annoying.