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
fq19851220
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 »

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

CMainWindow::CMainWindow() 
{
    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));
}
Attachments
%9A}8GM(8LE}W@VD9JZM8K5.png
%9A}8GM(8LE}[email protected] (27.45 KiB) Viewed 3294 times
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: How to embed wxFrame into MSW native window

Post by doublemax »

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