Extra buttons
Hi, I would like to add some buttons on the title bar of my window. Right by the minimize/maximize/close buttons. But can''t find a way to do it. Could anyone push me in the right direction?
If you intercept WM_NCPAINT, you can draw things to the window frame. Use the SystemParametersInfo function to determine where you should draw your own buttons.
Also, WM_NCLBUTTONDOWN and WM_NCLBUTTONUP should be intercepted to handle the mouse clicks in the non-client area (the window frame).
-Nik
EDIT: Of course you can draw custom stuff anywhere in the window, but from SystemParametersInfo you'll get the positions of the default stuff for reference.
[edited by - Nik02 on October 16, 2003 5:16:08 AM]
[edited by - Nik02 on October 16, 2003 5:16:27 AM]
Also, WM_NCLBUTTONDOWN and WM_NCLBUTTONUP should be intercepted to handle the mouse clicks in the non-client area (the window frame).
-Nik
EDIT: Of course you can draw custom stuff anywhere in the window, but from SystemParametersInfo you'll get the positions of the default stuff for reference.
[edited by - Nik02 on October 16, 2003 5:16:08 AM]
[edited by - Nik02 on October 16, 2003 5:16:27 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement