Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Начинающим";
Текущий архив: 2007.04.29;
Скачать: [xml.tar.bz2];

Вниз

Минимизация API-окна   Найти похожие ветки 

 
ElectriC ©   (2007-04-09 00:54) [0]

Как правильно отлавливать минимизацию окна?
Ниже приведённый код не помогает:

...

var Min : Boolean;

...

function WinProc(WinHan : THandle; Msg : UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
begin
 Result := DefWindowProc(WinHan, Msg, wParam, lParam);

 case Msg of
   ...  
 
   WM_SIZE    :
     If (wParam = SIZE_MAXHIDE) or (wParam = SIZE_MINIMIZED) then
        Min := True else Min := False;
   ...
 
 end;
end;

...


 
Мистер Т   (2007-04-09 06:38) [1]

Тебе уже отвечали, обрабатывай WM_ACTIVATE.

The WM_ACTIVATE message is sent to both the window being activated and the window being deactivated. If the windows use the same input queue, the message is sent synchronously, first to the window procedure of the top-level window being deactivated, then to the window procedure of the top-level window being activated. If the windows use different input queues, the message is sent asynchronously, so the window is activated immediately.

Parameters

wParam
The low-order word specifies whether the window is being activated or deactivated. This parameter can be one of the following values. The high-order word specifies the minimized state of the window being activated or deactivated. A nonzero value indicates the window is minimized.
WA_ACTIVE
Activated by some method other than a mouse click (for example, by a call to the SetActiveWindow function or by use of the keyboard interface to select the window).
WA_CLICKACTIVE
Activated by a mouse click.
WA_INACTIVE
Deactivated.

lParam
Handle to the window being activated or deactivated, depending on the value of the wParam parameter. If the low-order word of wParam is WA_INACTIVE, lParam is the handle to the window being activated. If the low-order word of wParam is WA_ACTIVE or WA_CLICKACTIVE, lParam is the handle to the window being deactivated. This handle can be NULL.


 
ElectriC ©   (2007-04-09 15:49) [2]

Всё нормально, thanks))



Страницы: 1 вся ветка

Форум: "Начинающим";
Текущий архив: 2007.04.29;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.04 c
6-1162551641
simplenick
2006-11-03 14:00
2007.04.29
Поиск файлов определенного типа по сайту


11-1156517931
Vladimir Kladov
2006-08-25 18:58
2007.04.29
Версия 2.38


15-1175605808
infom
2007-04-03 17:10
2007.04.29
Шрифт кода в программировании


2-1176017971
dreamse
2007-04-08 11:39
2007.04.29
Как создать каталог со вложеными подкаталогами если мы имеем


2-1175928885
-=Tiger=-
2007-04-07 10:54
2007.04.29
Подскажите ссылку на компонент...





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский