CodePudding user response:
Check whether the parameters in the getdlgitem for valid data, preliminary judgment is parameter is invalid or the result of error valuesCodePudding user response:
GetDlgItem may return NULL, GetDlgItem () - & gt; Will lead to access illegal pointerThe CWnd * pCtrl=GetDlgItem (XXX);
If (pCtrl)
{
PCtrl - & gt; XXXX
}