I want to save trouble, later in the ok function directly call close function, but the window is shut out,
The code is as follows:
The response function of the//ok button
Void Cgrab_MFCDlg: : OnBnClickedOk ()
{
This - & gt; OnClose ();
}
Void Cgrab_MFCDlg: : OnClose ()
{
If (bCameraOpen==TRUE)
{
Res=PylonDeviceClose (hDev);
CHECK (res);
Res=PylonDestroyDevice (hDev);
CHECK (res);
Free (imgBuf);
PylonTerminate ();
}
CDialogEx: : OnClose ();
}
My idea is that the onok onclose function call, and press the fork is the same effect, but the ok button to close not to drop,
CodePudding user response:
Add CDialogEx: : OnOK ();CodePudding user response:
OnBnClickedOk message map?The default overload OnOK
Equipment close calls advice overloading DestroyWindow between them, this modal/non-modal can call to
CodePudding user response: