I have a small project I'm working on. It has multiple dialogs so what I want to do is to have 1 main Window with multiple tabs in it. I want each tab to represent different dialog. For now I have that : Dialog with CTabCtrl opens as I expect and I have 3 tabs attached to it, when I press (for example) tab 1 it creates a new Modeless instance of my wanted PopUpDialog and it appears right where I want it. All good. But then if I move my main window , my PopUpDialog (which is borderless) stays on the same spot where he pops up at the start. Seems like the "spawn" location of my dialog is mapped to my CTabCtrl Dialog but it's not attached to it. I think I need to make it a child class or something like this . I am new to MFC and programming. I've been looking for answers for past 2 days but many links were deleted because they're too old. This is a little code example of what I'm doing:
void CTabCtrlDialog::OnSelchangeTab(NMHDR *pNMHDR, LRESULT *pResult)
{
CDialogIwantToPopUp *m_Page;
m_Page = new CDialogIwantToPopUp();
m_Page->Create(IDD_POPUP_DIALOG, m_tabTest.GetWindow(IDD_POPUP_DIALOG));
m_Page->ShowWindow(SW_SHOW);
}
This is a function (in my dialog that contains the tab control) that is responsible for click on any tab event.