How is the Start button created on the taskbar (or How do I add a button to the taskbar) ?

All development related issues welcome

Moderator: Moderator Team

Post Reply
Andrei003
Posts: 19
Joined: Sat Feb 16, 2019 11:25 pm

How is the Start button created on the taskbar (or How do I add a button to the taskbar) ?

Post by Andrei003 » Thu Jun 20, 2019 11:20 am

If anybody could help me, I need to know exactly how the Start button is added to the taskbar, so I can add another button, right next to the Start button.


Fraizeraust
Posts: 228
Joined: Thu Jan 05, 2017 11:46 am
Location: Italy
Contact:

Re: How is the Start button created on the taskbar (or How do I add a button to the taskbar) ?

Post by Fraizeraust » Sat Jun 22, 2019 2:03 pm

If I'm not mistaken, the chunk of code responsible for initializing/displaying the Start button is the CStartButton class on traywnd.cpp file (from 138 to 259 line).

The class begins by setting up the correct size for the button, applying bold font to the text, enabling the theme procedure (so that the button can be themed based on the current theme style on ReactOS), loading the text string from resource by invoking LoadStringW() function based on system's locale and finally creating the button with CreateWindowEx(), among other things.

https://github.com/reactos/reactos/blob ... d.cpp#L138

Andrei003
Posts: 19
Joined: Sat Feb 16, 2019 11:25 pm

Re: How is the Start button created on the taskbar (or How do I add a button to the taskbar) ?

Post by Andrei003 » Thu Oct 24, 2019 4:39 pm

But how do I make it so that is shows next to the Start button?

gonzoMD
Posts: 1026
Joined: Fri Oct 20, 2006 7:49 am
Location: Germany
Contact:

Re: How is the Start button created on the taskbar (or How do I add a button to the taskbar) ?

Post by gonzoMD » Thu Oct 24, 2019 5:24 pm

Andrei003 wrote:
Thu Oct 24, 2019 4:39 pm
But how do I make it so that is shows next to the Start button?
https://github.com/reactos/reactos/blob ... US.rc#L187


Edit: that's bullshit. I thought that you meant to change the caption from start to next. My fault.

Andrei003
Posts: 19
Joined: Sat Feb 16, 2019 11:25 pm

Re: How is the Start button created on the taskbar (or How do I add a button to the taskbar) ?

Post by Andrei003 » Sun Oct 27, 2019 6:56 pm

No, that's easy enough. I found it myself anyway. I just had to align it correctly based on the Y size of the Start button and then make sure program buttons don't draw behind the new button.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest