Home > Software engineering >  The error c2009 should enter the preprocessor directive
The error c2009 should enter the preprocessor directive

Time:10-19

 void Iputdlg: : OnEnChangeEdit2 () 
{
//TODO: if the control is RICHEDIT control, it will not be
//send the notice, unless the rewrite CDialogEx: : OnInitDialog ()
//function and call the CRichEditCtrl (.) SetEventMask (),
//at the same time the ENM_CHANGE flag "or" operation to the mask,

# 1015

//TODO: add the control notification handler code
}
Compile the results below
The error C2009: should input the preprocessor directive, but found a "1"

CodePudding user response:

What is the meaning of # 1015?

I guess the code is not completed, intentionally put a wrong point, convenient and easy to locate the next time you open to the code
//# 1015 block

CodePudding user response:



MFCAppDlg. Obj: error LNK2001: cannot resolve the external symbol of "public: void __thiscall CMFCAppDlg: : OnBnClickedCancel (void)" (? OnBnClickedCancel @ CMFCAppDlg @ @ QAEXXZ)
1> F: \ \ MFCApp \ Debug \ MFCApp vs file. Exe: fatal error LNK1120: one cannot resolve the external command

reference 1st floor zgl7903 response:
# 1015 is what mean?

I guess the code is not completed, intentionally put a wrong point, convenient and easy to locate the next time you open to the code
//# 1015 shielding

CodePudding user response:

In OnBnClickedCancel CMFCAppDlg classes declared in the function, but does not implement the code
Add in the MFCAppDlg
Void CMFCAppDlg: : OnBnClickedCancel () {}

CodePudding user response:

CMFCAppDlg: : OnBnClickedCancel this function CMFCAppDlg class does not implement the ~

CodePudding user response:

reference zgl7903 reply: 3/f
in OnBnClickedCancel CMFCAppDlg classes declared in the function, but there is no implementation code
Add in the MFCAppDlg
Void CMFCAppDlg: : OnBnClickedCancel () {}

I think maybe because I double click the sample edit box and then produce the corresponding handler code area, and it is not need to use this function, and that is the reason for this?

CodePudding user response:

The
reference 4 floor VisualEleven reply:
CMFCAppDlg: : OnBnClickedCancel this function CMFCAppDlg class does not implement the ~

Change is good, can compile, but an error occured while debugging, as follows:

What is the meaning of this?

CodePudding user response:

The Debug under open the call stack, look at the function call stack, find the error function call ~ first

CodePudding user response:

[b] [b]
refer to 7th floor VisualEleven response:
Debug under open the call stack, look at the function call stack, find the error function call first ~



After the Call Stack is like this:
Mfc110d DLL! The CWnd: : ModifyStyle (unsigned long dwRemove, unsigned long dwAdd, unsigned int nFlags) line 225 c + +
225 line is this:
 BOOL CWnd: : ModifyStyle (DWORD dwRemove, dwords dwAdd, UINT nFlags) 
{
ASSERT (: : IsWindow (m_hWnd) | | (m_pCtrlSite!=NULL));//line 225

If (m_pCtrlSite==NULL)
Return ModifyStyle (m_hWnd, dwRemove dwAdd, nFlags);
The else
Return m_pCtrlSite - & gt; ModifyStyle (dwRemove dwAdd, nFlags);
}

CodePudding user response:

Your dialog box to create success, meaning your window handle is not correct
  • Related