Join date:2010-03-12 02:50:07
Posts: 2
Posts: 2
Hi guy, I\'am having trouble compiling the following code within my windows form project onto VC++ express 8:
Which I call from the main function:
When hitting F7, I \'m receiving the following:
warning C4441: calling convention of \'__stdcall \' ignored; \'__clrcall \' used instead
and :
error C3867: \'spywindows::Form1::EnumWindowsProc\': function call missing argument list; use \'&spywindows::Form1::EnumWindowsProc\' to create a pointer to member
Hope anyone can help
BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam)
{
if (hwnd == NULL)
{
return FALSE;
}
TCHAR wn[255];
int iLen = GetWindowText(hwnd, wn, 255);
if (IsWindowVisible(hwnd) && iLen > 0)
{
MessageBox::Show( \"You must enter a name.\", \"Name Entry Error\",MessageBoxButtons::OK, MessageBoxIcon::Exclamation );
}
return TRUE;
}
{
if (hwnd == NULL)
{
return FALSE;
}
TCHAR wn[255];
int iLen = GetWindowText(hwnd, wn, 255);
if (IsWindowVisible(hwnd) && iLen > 0)
{
MessageBox::Show( \"You must enter a name.\", \"Name Entry Error\",MessageBoxButtons::OK, MessageBoxIcon::Exclamation );
}
return TRUE;
}
Which I call from the main function:
EnumWindows(EnumWindowsProc, NULL);
When hitting F7, I \'m receiving the following:
warning C4441: calling convention of \'__stdcall \' ignored; \'__clrcall \' used instead
and :
error C3867: \'spywindows::Form1::EnumWindowsProc\': function call missing argument list; use \'&spywindows::Form1::EnumWindowsProc\' to create a pointer to member
Hope anyone can help
