AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 29.12.2007, 19:50   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
Ruslan Goncharov: How to get list of all open windows and their names in AX
Источник: http://rusgon.blogspot.com/2007/12/h...indows-in.html
==============

How to get list of all open windows and their names in AX.
Just run following job.
X++:
static void JobAllTheWindows(Args _args)
{
    hWnd Parent;
    hWnd handle;
 
    hWnd mdi;
    #WinApi
 
    dialog d = new Dialog();
    DialogTabPage dt;
 
    str text;
    ;
 
    d.caption("All the windows");
    d.windowType(FormWindowType::PopUp);
 
    Parent = infolog.hWnd();
    mdi = WinApi::getWindow(Parent, #GW_CHILD);
 
    handle = WinApi::getWindow(mdi, #GW_CHILD);
    text = WinApi::getWindowText(handle);
 
    if(text)
    {
        dt = d.addTabPage(text);
        d.addText(text);
    }
 
    if(handle)
    {
        while(handle)
        {
            handle = WinApi::getWindow(handle, #GW_HWNDNEXT);
            text = WinApi::getWindowText(handle);
 
            if(text)
            {
                dt = d.addTabPage(text);
                d.addText(text);
            }
        }
    }
 
    d.run();
}
An interesting observation. As a matter of fact Infolog window is open always, even if we not see it at the moment!

Источник: http://rusgon.blogspot.com/2007/12/h...indows-in.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 17:41.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.