koden
October 3rd, 2005, 06:20 PM
CButton *lpStart = (CButton*)GetDlgItem(IDC_STARTBUTTON);
CButton *lpExit = (CButton*)GetDlgItem(IDCANCEL);
CEdit *lpLog = (CEdit *)GetDlgItem(IDC_LOG);
The above used to work when it wasn't a thread. It gives the following errors now:
C:\...testDlg.cpp(239) : error C2352: 'CWnd::GetDlgItem' : illegal call of non-static member function
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(1992) : see declaration of 'GetDlgItem'
C:\...testDlg.cpp(240) : error C2352: 'CWnd::GetDlgItem' : illegal call of non-static member function
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(1992) : see declaration of 'GetDlgItem'
C:\...testDlg.cpp(241) : error C2352: 'CWnd::GetDlgItem' : illegal call of non-static member function
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(1992) : see declaration of 'GetDlgItem'
Error executing cl.exe.
what do i do?
CButton *lpExit = (CButton*)GetDlgItem(IDCANCEL);
CEdit *lpLog = (CEdit *)GetDlgItem(IDC_LOG);
The above used to work when it wasn't a thread. It gives the following errors now:
C:\...testDlg.cpp(239) : error C2352: 'CWnd::GetDlgItem' : illegal call of non-static member function
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(1992) : see declaration of 'GetDlgItem'
C:\...testDlg.cpp(240) : error C2352: 'CWnd::GetDlgItem' : illegal call of non-static member function
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(1992) : see declaration of 'GetDlgItem'
C:\...testDlg.cpp(241) : error C2352: 'CWnd::GetDlgItem' : illegal call of non-static member function
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(1992) : see declaration of 'GetDlgItem'
Error executing cl.exe.
what do i do?