Hi,
Base on my understanding, I think you’d better use a custom form control. Then draw the CaptionButton. You can catch WM_NCPAINT message to draw the button.
The following articles tells about this:
http://www.codeproject.com/KB/wtl/CaptionButton.aspx?msg=1280213
And the docked container
http://www.codeproject.com/KB/toolbars/DockContainer.aspx
Best regards,
Ling Wang
Please remember to click “Mark as Answer�on the post that helps you, and to click “Unmark as Answer�if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.