There's no built-in functionality for doing this. You need to override the
WM_NCPAINT message, allow the non-client area to paint, and then paint your
button on top of it. You'll also need to handle WM_NCLBUTTONDOWN/UP, etc.
Basically, it's like a special-case custom control. I've never done this
from .NET, so yo may be able to do this from OnNcPaint and OnNcLButtonDown,
etc...
But it's not like adding a button to a form at all. Also, your button won't
pick up theme settings, so your button may look completely wrong. One way of
dealing with it is to somehow create a screenshot of one of the existing
buttons (minimize, close, maximize) and then use that to determine how to
draw the button similar to the theme.
"Franck FJ. Jobard" <Fr***********@PIERREMAUCHAMP.COMwrote in message
news:OL**************@TK2MSFTNGP02.phx.gbl...
Hello,
I Would like to add a new icon near the close/minimiez/maximize button in
a winfor
Did someone know how to do it ?
Thanks in advance
Franck