I'm using some Windows Forms Control Library
elements in my app.
My question is:
How to perform button click event which this element comes from Windows Forms Control Library?
So, I can get *library*
textbox value in ProgramDlg.cpp
file like this:
void CMFCApplication1Dlg::OnBnClickedButton1()
{
// TODO: Add your control notification handler code here
AfxMessageBox(CString(m_ctrl1.GetControl()->textBox1->Text));
// m_ctrl1.GetControl()->button1->Click();
// how can I write this above line to perform click event?
}
I defined m_ctrl1
in ProgramDlg.h
:
// ....
public:
CMFCApplication1Dlg(CWnd* pParent = NULL); // standard constructor
// Data member for the .NET User Control:
CWinFormsControl<WindowsFormsControlLibrary1::UserControl1> m_ctrl1;
// ....
ps sorry for my bad english.
Thanks.
I solved my problem by visiting this link .
Hope to be useful for other developers.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.