I am using event handler to automate page creation.I want to give feedback to the user using message center.Example code to access message center will be helpful.
Message Center is not a part of TOM.NET API. Its a part of Content Manager Explorer.
U can check this site: http://code.google.com/p/tridion-2011-power-tools/source/search?q=MessageCenter&origq=MessageCenter&btnG=Search+Trunk
Might be helpful how to access message center.
I don't think it's possible to access the Message Center via TOM.NET. One way would be to throw an exception in your event system and that will show in the Message Center, but I don't think you want that. The message will contain the exception and it will be labeled as error.
So, alternatively, I would implement a polling mechanism that executes on the CME as some Javascript code. This would poll and consume a service that provides the messages you want to show in the Message Center. Your event system code will write the messages to this service.
The Javascript code can be a GUI extension running some AJAX poller (as a Javascript timeout or interval) connecting the service and consuming its messages.
The service can be as simple as an aspx page, but you can also create some fancier approach e.g. a web service with web methods.