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 »

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.
User avatar
Fraizeraust
Posts: 234
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 »

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
a.k.a. GeoB99 -- ReactOS Kernel developer -- My Wiki page
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 »

But how do I make it so that is shows next to the Start button?
User avatar
gonzoMD
Posts: 1077
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 »

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 »

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 7 guests