search
User control panel - Subscribed threads - Posted threads
Jump forum:

 

post a new thread Reply to Thread

Problem with Findwindows

Starting message message posted 2010-03-12 02:54:26
Join date:2010-03-12 02:50:07
Posts: 2
geekdude
Novice
Hi guy, I\'am having trouble compiling the following code within my windows form project onto VC++ express 8:

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;

}



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
post a new thread Reply to Thread
Reply to Thread

Problem with Findwindows

You have to sign in to post messages to the forum.