Home > database >  PB call MFC VC wrote the ActiveX problems
PB call MFC VC wrote the ActiveX problems

Time:09-19

Use VC2010 wrote a MFC ActiveX controls, call in the PB,
In control, use a dialog box as the control interface, the dialog box with a button (CButton),
Write the button click event:
Void CMainDialog: : OnBnClickedBtnEnter ()
{
//TODO: add the control notification handler code
Cstrings strReceipts;
M_Receipts. GetWindowTextW (strReceipts);
MessageBoxW (_T (" input is: ") + strReceipts, _T (" message "));
}
In PB call control is normal, but many times (3) click on the button after the prompt dialog box (3 times), the control of the dialog interface disappeared,
Each master, where is the problem?

Ontouch function:
Void CMyActiveXCtrl: : ontouch (CDC * PDC, const CRect& RcBounds, const CRect& RcInvalid)
{
if (! PDC)
return;

//TODO: code to replace the following code in your own drawing,
M_MainDialog. MoveWindow (rcBounds, TRUE);
CBrush brBackGnd (TranslateColor (AmbientBackColor ()));
PDC - & gt; FillRect (rcBounds, & amp; BrBackGnd);
}

CodePudding user response:

Problems should be out on your vc code, vc are not ripe, they can try to vc section, or use DLL to realize, should be able to avoid this problem
  • Related