 <p>Just add a default constructor without the handle parameter. Make sure MyWindowClass subclasses NSWindow and it should work.</p> <p>Also, you may need to keep a reference to your myWindow around - so that it does not get garbage collected.</p>