通过
void CDao1Ctrl::OnDraw(
CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)
{
// TODO: Replace the following code with your own drawing code.
if( m_hWnd )
m_MyDlg.MoveWindow(rcBounds);
}
和int CDao1Ctrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (COleControl::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
m_MyDlg.Create(IDD_MYDIALOG, this);
return 0;
}
函数,在控件中添加了一个对话框,现在,想在这个对话框中放一个按钮,点击后,通过.DoModal()打开对话框,请高手帮忙给出方法和代码。谢谢!
void CDao1Ctrl::OnDraw(
CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)
{
// TODO: Replace the following code with your own drawing code.
if( m_hWnd )
m_MyDlg.MoveWindow(rcBounds);
}
和int CDao1Ctrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (COleControl::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
m_MyDlg.Create(IDD_MYDIALOG, this);
return 0;
}
函数,在控件中添加了一个对话框,现在,想在这个对话框中放一个按钮,点击后,通过.DoModal()打开对话框,请高手帮忙给出方法和代码。谢谢!
你是还想再弹出一个对话框是么??那就在Mydlg里加button,然后映射消息,就可以啦希望再说的明白点
http://www.codeguru.com/activex/dialogctrl.shtml
then you can add button and dialog resource by hand.