Is this the correct usage of the QWinHost in the context of MFC?
CDialog* lpMfcDlg= new CDialog();
lpMfcDlg->Create(IDD_DIALOG);
QWinHost* lpChild = new QWinHost(lpDialog);
lpChild->setWindow(lpMfcDlg->GetSafeHwnd());
lpDialog->ui.tabWidget->addTab(lpChild);
QDialog* lpDialog = new QDialog();
CDialog* lpMfcDlg= new CDialog();
lpMfcDlg->Create(IDD_DIALOG);
QWinHost* lpChild = new QWinHost(lpDialog);
lpChild->setWindow(lpMfcDlg->GetSafeHwnd());
lpDialog->ui.tabWidget->addTab(lpChild);
To copy to clipboard, switch view to plain text mode
Interestingly, when I do this, nothing crashes, but the tab housing the MFC control does not display its contents, and in fact does not draw anything (the previous visited tab's contents are still being drawn indicating that this tab is literally drawing nothing - not even covering up what was drawn before).
Another thing I've noticed is that the CMyMfcDlg::OnInitDialog method is not being called, but it is called if I were to do this instead: CMyMfcDlg:: DoModal( ).
EDIT: lpMfcDlg->GetSafeHwnd() was returning NULL, but I corrected that and it is still not working. The tab is still unresponsive/not being drawn.
Bookmarks