EnumDesktopWindows takes a pointer to a function as its second argument. The template (not an actual C++ template) function for this is:
EnumDesktopWindows(hDesktop, EnumWindowsProc(), lParam);
(Source: EnumWindowsProc Function (Windows))
BOOL CALLBACK EnumWindowsProc(
__in HWND hwnd,
__in LPARAM lParam
In other words, you must write a function (with whatever name you want) that returns type BOOL and takes a HWND and an LPARAM as arguments. I'm pretty sure that CALLBACK is just a define/typedef (can calling conventions be typedef'd?) for the calling convention, you're going to want it in there anyway. You then pass this function to EnumDesktopWindows.
Note that in my experience with EnumDesktopWindows, it only returns windows that are direct descendants of the desktop window.
BOOL CALLBACK MyEnumProc( HWND wnd, LPARAM lParam )
//do something with window here
int main( void )
EnumDesktopWindows( GetDesktopWindow(), MyEnumProc, 0 );
This should probably be in the Windows Programming section.