Using Delphi I would like to add another button to the border icon buttons; close, maximize, minimize. Any ideas on how to do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This was easy to do prior to Windows Aero. You simply had to listen to the
WM_NCPAINTandWM_NCACTIVATEmessages to draw on top of the caption bar, and similarly you could use the otherWM_NC*messages to respond to mouse clicks etc, in particularWM_NCHITTEST,WM_NCLBUTTONDOWN, andWM_NCLBUTTONUP.For instance, to draw a string on the title bar, you only had to do
Now, this doesn’t work with Aero enabled. Still, there is a way to draw on the caption bar; I have done that, but it is far more complicated. See this article for a working example.