Experts Exchange connects you with the people and services you need so you can get back to work.
class CMyControlDlg : public CDialog
CMyControlDlg::CMyControlDlg( CWnd* pParent = NULL )
: CDialog( IDD_MY_CONTROL, pParent )
Open in new window
CMyControlDlg* m_pChild ;
int OnCreate(LPCREATESTRUCT lpCreateStruct);
void OnSize(UINT nType, int cx, int cy); // optional (see comment below)
void DoDataExchange(CDataExchange* pDX); // optional (see comment below)
int CMyControlParent::OnCreate(LPCREATESTRUCT lpCreateStruct)
if (CDialog::OnCreate(lpCreateStruct) == -1)
m_pChild = new CMyControlDlg();
void CMyControlParent::OnSize(UINT nType, int cx, int cy)
CDialog::OnSize(nType, cx, cy);
// some how calculate correct position and size here, this is just a dumb sample
rect.bottom -= 20;
void CMyControlParent::DoDataExchange(CDataExchange* pDX)
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.