Hi Mustafa,
I gather you're trying something along these lines?
http://delphi.about.com/od/adptips2006/qt/draw_captionbar.htm
I've seen other articles where people report problems with this and suggest a workaround:
http://stackoverflow.com/questions/1168232/delphi-draw-a-text-in-a-caption-form-for-vista-with-aero-like-windows-7
A better way to go might be to use the TsTitleBar component in AC. This allows you to setup a collection of title bar objects (including labels, menus etc) and won't require you to write any API or message handling routines. Anyway take a look at TsTitleBar and let us know if that solves your problem. HTH.
Regards,
Hamilton