Hi all.
There is up to your attention the fine method to define opened windows in Axapta.
You can use it in other purposes.
static void CountAxaptaWindows(Args _args)
{
DLL user32;
DLLFunction AxaptaVisibleWindows;
HWND MdiClient, child;
str windowText;
boolean isVisible(int _ind)
{
return AxaptaVisibleWindows.call(_ind)? true:false;
}
;
user32 = new DLL('USER32');
AxaptaVisibleWindows = new DLLFunction(user32, 'IsWindowVisible');
AxaptaVisibleWindows.returns(ExtTypes::DWord);
AxaptaVisibleWindows.arg(ExtTypes::DWord);
MdiClient = WinAPI::FindWindowEx(infolog.hWnd(), 0, 'MDIClient', '');
for (Child = WinAPI::FindWindowEx(MdiClient, 0, '', '');
Child ;
Child = WinAPI::FindWindowEx(MdiClient, child, '', ''))
{
if (Child != 0)
{
WindowText = WinAPI::getWindowText(child);
if (WindowText != "" && isVisible(child))
{
info(WindowText);
}
}
}
}
MikeR
going to Europe
0
Comments
Long way to go before I sleep..