Link to home
Start Free TrialLog in
Avatar of derekl
derekl

asked on

Custom Caption Painting

Actually, what I am most interested in, is custom caption buttons.  What I need to know, is how to implement a button which is functionally equivalent to the close, minimize, and maximize buttons, but which has a different bitmap associated with it.  I know the standard caption buttons are drawn with the DrawFrameControl function, but I see no provisions in this function for a user drawn button.  Also, how does one deal with the fact that the size of the title bar can be changed.  Does this rule out using a bitmap to paint the button?  What I would like to have, is an up or down arrow which would allow the user to roll up the client area to 0 in the case of the up arrow, or roll it back to its previous state in the case of the down arrow.  I believe I have seen this functionality in some of Corel Draw's tool bars.
Avatar of derekl
derekl

ASKER

Edited text of question.
First, leave the close, max, and min buttons alone. These are standard and you will only confuse users by altering their appearance.

See :

http://www.iarchitect.com/mshame.htm

If you read thru there, you'll never consider changing Windows standard features again! LOL

Re the arrow to roll the client area up and down. Neat idea. Why not put these on a toolbar?
At the handler for the new button, use SendMessage to send WM_SYSCOMMAND to the window.  Use the following for wParam:

SC_CLOSE for Close
SC_MAXIMIZE for Maximize
SC_MINIMIZE for Minimize
SC_RESTORE for Restore

The lParam in this case is not used.

Hope it helps!


DragonSlayer

(I wish the email notification check mark in this box would remain checked as default, I always forget to check the checkbox)

ASKER CERTIFIED SOLUTION
Avatar of Luis Alonso Ramos
Luis Alonso Ramos
Flag of Mexico image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial