You can handle 'WM_NCPAINT' in your form's 'WndProc' and draw the button
onto the title bar. There are other 'WM_NC*' messages which are sent to the
form when mouse events occur.
BTW, I am not familliar with those Windows API functions(i.e. WM_NCPAINT),
is there any place I can find some detailed description about those
functions? Thanks.