Página 1 de 1
EnumWindows
Publicado: Sab Jun 23, 2012 3:38 am
por Guest
Is the api function EnumWindows available in Xailer? I get a link
error, when trying to use it.
When a related function, IsWindowVisible, is used, no problems.
The purpose is to just try to get a list of Top level, visible windows,
without having to resort to a third-party library.
EnumWindows
Publicado: Lun Jun 25, 2012 10:55 am
por ignacio
Childers escribió el sáb, 23 junio 2012 03:38Is the api function EnumWindows available in Xailer? I get a link
error, when trying to use it.
When a related function, IsWindowVisible, is used, no problems.
The purpose is to just try to get a list of Top level, visible windows,
without having to resort to a third-party library.
Dear Sir,
That function can not be easily used at the PRG level, since it requires a callback function. BTW, I include in this message a small function to retrieve all the window handles.
Regards,
#pragma BEGINDUMP
#include <windows.h>
#include <xailer.h>
static BOOL CALLBACK EnumWndProc( HWND hWnd, LPARAM lParam )
{
if( IsWindow( hWnd ) )
{
PHB_ITEM pItem = hb_itemNew( NULL );
hb_arrayAddForward( (PHB_ITEM) lParam, hb_itemPutNL( pItem, (long) hWnd ) );
}
return TRUE;
}
//------------------------------------------------------------------------------
HB_FUNC( ENUMWINDOWS )
{
PHB_ITEM aWindows = hb_itemArrayNew( 0 );
EnumWindows( EnumWndProc, (LPARAM) aWindows );
hb_itemReturnForward( aWindows );
hb_itemRelease( aWindows );
}
#pragma ENDDUMP
EnumWindows
Publicado: Mié Jun 27, 2012 3:16 am
por Guest
Ok, I'll take a look at it, thanks Ignacio.
I've got another problem, a different kind. It's not really
Xailer-specific, but I just wanted to see if you have any insight. Will
forward in a separate email.