I think you will find that using CreatePopupMenu and subsequent AppendMenuW much more simple and flexible (for variable amount of items, sub menus tree, formatting, etc), no subclassing is needed.