This will hide the icon:
http://www.macosxtips.co.uk/index_files/disable-the-dock-icon-for-any-application.html
Summarizing the URL, in the dict xml element inside Info.plist
in the app, add the lines:
LSUIElement
1
You need to use the appropriate OS APIs to add the menu.