How to embed wxFrame into MSW native window

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
In need of some credit
In need of some credit
Posts: 1
Joined: Sun Mar 14, 2021 8:10 am

How to embed wxFrame into MSW native window

Post by fq19851220 » Sun Mar 14, 2021 11:50 am

I want to embed wxFrame to msw native window, using wxPanel to embed wxNativeContainerWindow works fine, but not using wxFrame. I want to get a wxFrame effect like the one in the picture ,Thanks for any help

Code: Select all

    Create(NULL, _T("Hello Foundation Application"),
        WS_OVERLAPPEDWINDOW, rectDefault, NULL);
    m_containerWX = new wxNativeContainerWindow(m_hWnd);           
    wxPanel* p = new MyPanel(m_containerWX, wxPoint(50, 50));       // OK
    //wxFrame* f = new MyFrame(m_containerWX, wxPoint(50, 50));     //Not working
    new wxWindow(m_containerWX, wxID_ANY, wxPoint(4, 4), wxSize(1, 1));
%9A}8GM(8LE}W@VD9JZM8K5.png (27.45 KiB) Viewed 1146 times

User avatar
Posts: 16019
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: How to embed wxFrame into MSW native window

Post by doublemax » Sun Mar 14, 2021 1:02 pm

With wxFrame being a toplevel window with caption, titlebar, menu etc, i don't think this is possible.
Use the source, Luke!

Post Reply