I haven't done this myself, but this thread has some examples intended to do similar things. I would start by importing one of those and make sure it works as given, then amend it in small steps to get what you want. If it stops working then you know that the step you have just made is not correct. Set a logo in the title bar?