информационная безопасность
без паники и всерьез
 подробно о проектеRambler's Top100
Страшный баг в WindowsЗа кого нас держат?Портрет посетителя
BugTraq.Ru
Русский BugTraq
 Анализ криптографических сетевых... 
 Модель надежности двухузлового... 
 Специальные марковские модели надежности... 
 Три миллиона электронных замков... 
 Doom на газонокосилках 
 Умер Никлаус Вирт 
главная обзор RSN блог библиотека закон бред форум dnet о проекте
bugtraq.ru / форум / programming
Имя Пароль
ФОРУМ
если вы видите этот текст, отключите в настройках форума использование JavaScript
регистрация





Легенда:
  новое сообщение
  закрытая нитка
  новое сообщение
  в закрытой нитке
  старое сообщение
  • Напоминаю, что масса вопросов по функционированию форума снимается после прочтения его описания.
  • Новичкам также крайне полезно ознакомиться с данным документом.
[Win32] “Almost modal” IE dialogs on Windows 7 24.07.12 23:34  
Автор: void <Grebnev Valery> Статус: Elderman
<"чистая" ссылка>
Sorry for writing in English. Right now I do not have the Russian keyboard…

A number of IE8/IE9 modal dialogs running on top of Windows 7 can be minimized separately from the IE window, which is confusing. Such “almost modal” dialog does not look really modal on Windows 7. Open the IE, set the Blank Page URL (“about:blank”), and open the “Favorites/Add to favorites…” dialog. Then open the Windows Task Manager, and minimize one of the tasks called “Blank Page – Windows Internet Explorer”. You can minimize the “modal” dialog; the IE will remain on the screen inaccessible. Or you may choose to minimize the IE window; the dialog will remain on the screen. The “Favorites/Add to favorites…” box is not the only dialog behaviors this fashion. There is a bunch of similar dialogs: “File/Page Setup…”, “File/Print Preview…”, “File/Properties”, “Favorites/Add current tabs to favorites…”, “Favorites/Organize favorites…”, “Help/About Internet Explorer”.

I do not see a simple way how it could be fixed. Attempts to find out a “correct” parent/owner HWND when creating ActiveX UI (such as IWebBrowser2 window, Top-Level IWebBrowser2 window, or variation of those and TabWindowClass windows) does not work… It seems the IE detours WinAPI calls when creating dialogs, so the IE decides itself in which “iexplorer.exe” process the dialog will be put, and which parent/owner HWND for the dialog will be. Even if you pass a “correct” parent HWND value in a WinAPI function creating a dialog, the IE/Windows detouring will likely ignore it. Say you want to set the dialog parent HWND to the IWebBrowser2::get_HWND() value. The IE will likely move the dialog to another “iexplorer.exe” process and set the parent HWND to the so called “Alternate Modal Top Most” window (the “Alternate Modal Top Most” window is running in the different process then the main IE window “IEFrame”).

Things become more complicated if an ActiveX object is loaded. All the IE9 embedded dialogs become “almost modal”. As opposite, all the IE8 embedded dialogs become modal.

Is it possible to fix this? How to design a modal (not “almost modal ”) dialog in the ActiveX UI? In other words, how to design a dialog which would be executed in the same “iexplorer.exe” process where the “IEFrame” windows is running, and the “IEFrame” would be the parent/owner of the dialog?
Криво и не по ТЗ, но быстро 25.07.12 13:16  
Автор: Ustin <Ustin> Статус: Elderman
Отредактировано 25.07.12 13:19  Количество правок: 1
<"чистая" ссылка>
если ты можешь отловить дескриптор своего диалога, никто не мешает тебе форкнуть поток и периодически опрашивать его на свёрнутость / при необходимости восстанавливать.
Понимаю, что предлагаю забить гвоздь микроскопом, но никто не гарантирует, что в ie10 и проч поведение не изменится.
Thank you for your comment. Actually there is no need to... 26.07.12 17:01  
Автор: void <Grebnev Valery> Статус: Elderman
<"чистая" ссылка>
Thank you for your comment. Actually there is no need to create another thread. We can do it on the WM_TIMER message.
Ну либо так. Тот же гвоздь тем же микроскопом :) 28.07.12 15:18  
Автор: Ustin <Ustin> Статус: Elderman
Отредактировано 28.07.12 15:26  Количество правок: 3
<"чистая" ссылка>
О, а ты сам отрабатываешь свою очередь сообщений?
Тогда делов - написать свой обработчик WM_SYSCOMMAND и игнорить SC_MINIMIZE да и всё...
Окно диалога необходимо минимизировать тогда, когда... 31.07.12 04:26  
Автор: void <Grebnev Valery> Статус: Elderman
<"чистая" ссылка>
> О, а ты сам отрабатываешь свою очередь сообщений?
> Тогда делов - написать свой обработчик WM_SYSCOMMAND и
> игнорить SC_MINIMIZE да и всё...

Окно диалога необходимо минимизировать тогда, когда минимизируется окно "IEFrame" IE9, и восстанавливать, когда восстанавливается окно "IEFrame". Аналогично, когда минимизируется окно диалога, необходимо минимизировать окно "IEFrame". Т.е. должно работать всё синхронно, как это работает для модального диалога (окна минизируют и восстанавливают при помощи Windows Task Manager).
Ну чо-т по-простому х3 как, 31.07.12 15:32  
Автор: Ustin <Ustin> Статус: Elderman
<"чистая" ссылка>
возможно правда дешевле таймером\потоком.
А если твой диалог и родительское окно в разных процессах - по мне так точно проще.
1




Rambler's Top100
Рейтинг@Mail.ru


  Copyright © 2001-2024 Dmitry Leonov   Page build time: 0 s   Design: Vadim Derkach