FromHandle(/*Handle provided by spy++*/)
SetWindowText()
<br /> // IDC_MSACALCTRL1 is the ID of the Calendar control OCX embedded <br /> // on this dialog<br /> CWnd *pWndCal = GetDlgItem(IDC_MSACALCTRL1);<br /> <br /> // Use the IUnknown of the control<br /> LPUNKNOWN pUnk = pWndCal->GetControlUnknown();<br /> <br /> // From there get the IDispatch interface of control<br /> LPDISPATCH pDisp = NULL;<br /> pUnk->QueryInterface(IID_IDispatch, (LPVOID*)&pDisp);<br /> <br /> // use IDispatch method to invoke the control's functionality<br /> <br /> return TRUE; // return TRUE unless you set the focus to a control<br />
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)