Minimize Icon, Maximize icon?

How do I change the graphics of the maximize and minimize icon?(the one on the top right hand corner)
RodneyYeoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MichaelSCommented:
Not easy one. You have to drow it by your own in the WM_NCPAINT message.

case WM_NCPAINT:
{   HDC hdc;
    hdc = GetDCEx(hwnd, (HRGN)wParam, DCX_WINDOW|DCX_INTERSECTRGN);
    // Paint your pictures
    ReleaseDC(hwnd, hdc);
}
0
RodneyYeoAuthor Commented:
say, i manage to draw over the current icons, will that particular spot respond to my mouse click?
let say I shift my minimize and maximize icons to the centre of the title bar, how do i handle the message of the mouse click?
0
RodneyYeoAuthor Commented:
Adjusted points to 30
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

luisrCommented:
It is not easy... for painting your own title bar see the code published by Paul DiLascia in the June 1997 issue of MSJ. To make other buttons respond you would need to trap WM_NCLBUTTONDOWN and UP messages and hit test for your buttons.

You can download the code from http://www.microsoft.com/msj/.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RodneyYeoAuthor Commented:
I have add 3 window messages into my mainframe, OnNcPaint(), OnNcActivate(), OnNcLButtonDown().
SOme of codes in my OnNcLButtonDown()
{
CRect rect;
// Get the button position
GetButtonRect(&rect);
if (rect.PtInRect(point))
{
drawButton();
CFrameWnd::OnNcLButtonDown();
....
}
....
}

It seems that the CFrameWnd::OnNCLButtonDown will override my graphic display of my drawButton(). How do I turn off the graphical display of the minimize, maximize and close button. THanks.
0
RodneyYeoAuthor Commented:
Adjusted points to 50
0
luisrCommented:
When dealing with the titlebar, it's either all or nothing. If you want to do something, you have to handle everything, and not pass anything to the base class (or ::DefWindowProc).
0
RodneyYeoAuthor Commented:
Thanks for the advice. I guess there's no easy way out. I will study the codes that you have provided and paint my own title bar.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.