Since the recent beta contains a Windows 10/11 specific (and experimental) dark theme, I was wondering if that also paves the way for other functions that are specific to certain Windows versions only.
I've had a little DLL project called mircThumbBar (also m7rc, since I made it back with Windows 7) for the longest time, so I can play/pause and prev/next my MP3 player even when mIRC is in the background.
I had my
fair share of issues with it, but got something working and have been using it for over 15 years at this point. It looks like this:
This uses the
Thumbnail Toolbar API from the
ITaskbarList3 interface (and some maybe not-so-nice redirecting of the mIRC WndProc to get events back to me). Regular
$dll calls to prepare the list, then finally display it. Memory mapped file for the back-channel so I can react to clicks by calling one of my functions/aliases.
I'm not too sure about a command sequence though. Those three buttons on top are three
AddButton calls followed by a
CreateButtons call (basically: Queue up buttons, set their properties, then trigger the toolbar creation/modification). Later, I use
SetButtonIcon/
SetButtonFlags and
UpdateButtons to (queue and then) make changes; for example when I pause/play and want to change the image.
Maybe as part of
/window, perhaps as a new
/thumbbar command? To test (and read), accompanying
$window (or
$thumbbar) identifiers? I can totally see this work without the
CreateButtons/
UpdateButtons calls, but I feel like I overengineered this to optimize how often I have to call the
ITaskbarList3 methods...not to mention that I took a few shortcuts and didn't implement things I didn't need, like
RemoveButton/
ClearButtons.
There's other Vista/7+ functions for augmenting and interacting with the taskbar, but I feel like those buttons are the most useful ones here. Doing nothing (or returning an error) for Windows versions that don't support the functionality should be fairly easy to do, but at this point none of them are
really in support anymore.
Microsoft published a
sample project, and my code is here in
this Gist.