|
|
От: | alexeiz | |
| Дата: | 28.03.11 07:33 | ||
| Оценка: | |||
С>HWND FindApplicationWindow()
С>{
С> HWND foundHWnd = 0;
С> DWORD procID = GetCurrentProcessId();
С> EnumWindows([&foundHWnd,&procID](HWND hWnd, LPARAM lParam) -> BOOL
С> {
С> /*
С> ********************************************
С> */
С> return TRUE;
С> },
С> 0);
С>}
С>С>error C2664: 'EnumWindows' : cannot convert parameter 1 from '`anonymous-namespace'::<lambda0>' to 'WNDENUMPROC'
typedef int (*func)(int);
int foo(func f)
{
return f(10);
}
int main()
{
return foo([](int a) { return 2 * a; });
}