How to init a NavCanvas inside a size in a panel class in a Splitter window

I’m trying to replace a NavCanvas from a snippet I made with a static bitmap widget that sits in a vertical BoxSizer inside a panel base image preview class that will sit inside a Splitter window but I get errors alongs the lines of:

dgets/src/common/wincmn.cpp(2488) in SetContainingSizer(): Adding a window already in a sizer, detach it first!

Any idea?

Also how do you change and view refresh a scaled bitmat image inside the NavCanvas?