I want to Write CToolBar class from the scratch
-
Is it a Big deal to do that stuff ?? See my problem is our Art director has given me a task to create a fancy shaped toolbar which is a mixture of Office2K type Flat toolbars and Mac os type round edges etc. I tried to study some of the very good toolbar classes available on CodeProject, but it seems that I can Draw only within the buttons area. not on the edges or Title bar of the toolbar(when its floating) so I need some guidance of how to go about this kind of a stuff. Gurus please guide me .. I dont mind working hard to write a Toolbar class from the scratch. Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
Is it a Big deal to do that stuff ?? See my problem is our Art director has given me a task to create a fancy shaped toolbar which is a mixture of Office2K type Flat toolbars and Mac os type round edges etc. I tried to study some of the very good toolbar classes available on CodeProject, but it seems that I can Draw only within the buttons area. not on the edges or Title bar of the toolbar(when its floating) so I need some guidance of how to go about this kind of a stuff. Gurus please guide me .. I dont mind working hard to write a Toolbar class from the scratch. Abhishek Narula "Learn to appreciate others ... World would appreciate you"
The NCPAINT message lets you draw around the edges. If you decide to roll your own, look through the MFC source first to see how it all works. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
-
Ya I am trying to do some drawing in NCPAINT handler ... But some how I am not able to draw in the full rectangle .. Just look at the following code and please what is wrong in the code.. CWindowDC cpDC (this); CRect rcClip; GetClientRect(&rcClip); cpDC.FillSolidRect (rcClip,RGB(255,0,0)); the above code does not fill the full rectangle , it still leaves so many margins .. Also please tell me the differnce between GetWindowRect and GetClientRect .. Thank you very much Abhishek Narula "Learn to appreciate others ... World would appreciate you"
1 - GetClientRect is the problem 2 - GetWindowRect gets the whole window area, usually in screen coordinates ( i.e. relative to the top left ), and GetClientRect gets the client area only ( the bit you can draw in OnPaint ). Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
-
The NCPAINT message lets you draw around the edges. If you decide to roll your own, look through the MFC source first to see how it all works. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
Ya I am trying to do some drawing in NCPAINT handler ... But some how I am not able to draw in the full rectangle .. Just look at the following code and please what is wrong in the code.. CWindowDC cpDC (this); CRect rcClip; GetClientRect(&rcClip); cpDC.FillSolidRect (rcClip,RGB(255,0,0)); the above code does not fill the full rectangle , it still leaves so many margins .. Also please tell me the differnce between GetWindowRect and GetClientRect .. Thank you very much Abhishek Narula "Learn to appreciate others ... World would appreciate you"
-
1 - GetClientRect is the problem 2 - GetWindowRect gets the whole window area, usually in screen coordinates ( i.e. relative to the top left ), and GetClientRect gets the client area only ( the bit you can draw in OnPaint ). Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
Thanks a lot you have been a great help. Abhishek Narula "Learn to appreciate others ... World would appreciate you"