When using floating menu bars, Savebarstate and LoadBarstate have problems. If the menu is floating, it will appear in the upper left corner when the application is restacked, and it is fixed when the screen is fixed, and the next startup will appear in this position. What is the reason?
Try this
Ptoolbar-> Create (this, ..., id_mytoolbar);
Your toolbar needs to include the ID, not like the default toolbar.