Adding an icon to the application taskbar

G

Guest

Hello everybody,

I'd like to add an icon to my application's titlebar (to the left of the
minimize icon). And no, it will not be the icon to minimize application to
tray ;)

Nevertheless, I don't have a clue where to start (I'm kinda new to this).
Any hints/suggestions will be GREATLY appreciated!

Regards,
Baal80
 
M

Mattias Sjögren

I'd like to add an icon to my application's titlebar (to the left of the
minimize icon). And no, it will not be the icon to minimize application to
tray ;)

Nevertheless, I don't have a clue where to start (I'm kinda new to this).
Any hints/suggestions will be GREATLY appreciated!


The titlebar is part of the so called non-client area of the window.
It has its own set of messages for input and drawing. Unfortunately
they aren't exposed by Winforms so you have to override the WndProc
method and handle the messages yourself. For custom drawing
specifically, you want to handle the WM_NCPAINT message. You can
probably find examples by googling that message name.


Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top