Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2002.07.01;
Скачать: CL | DM;

Вниз

Перезагрузка - это...   Найти похожие ветки 

 
Митяй2   (2002-06-14 13:20) [0]

Как определить, например в методе
FormCloseQuery главной формы, что
собирается cделать Windows:
1. Перезагрузить?
1.1. комп
1.2. windows
2. Выключить комп?
3. Завершить сеанс?


С уважением, Митяй
dim@uic.asu.ru
mitiai@rol.ru


 
Игорь Шевченко ©   (2002-06-14 13:31) [1]

Проще обрабатывать сообщение WM_QUERYENDSESSION
Form.CloseQuery этого узнать не позволит


 
МитяЙ2   (2002-06-18 10:06) [2]

Спасибо, Игорь

Как, анализировать WM_QUERYENDSESSION?

Я создал
...
private
procedure WMQueryEndSession(var M: TWMQueryEndSession);
message WM_QueryEndSession;
...

...

...
procedure TfmCD.WMQueryEndSession(var M: TWMQueryEndSession);
var
...
begin

//M.Msg
//M.Source
//M.Unused
//M.Result

// Здесь я перебрал все свойства TWMQueryEndSession,
// но ни одно из них не говорило о том, как Windows завершает работу!


end;


 
Игорь Шевченко ©   (2002-06-18 10:21) [3]

After processing this message, the system sends the WM_ENDSESSION message with the wParam parameter set to the results of the WM_QUERYENDSESSION message.

A window receives this message through its WindowProc function.

LRESULT CALLBACK WindowProc(
HWND hwnd, // handle to window
WM_QUERYENDSESSION, // the message to send
WPARAM wParam, // not used
LPARAM lParam // logoff option
);
Parameters
wParam
This parameter is reserved for future use.
lParam
Specifies whether the user is logging off or shutting down the system. If this parameter includes the ENDSESSION_LOGOFF value, the user if logging off. (Note that this parameter is a bit mask. To test for this value, use a bit-wise operation; do not test for equality.)
Windows 2000/XP: If this parameter is zero, the system is shutting down.

Return Values
If an application can terminate conveniently, it should return TRUE; otherwise, it should return FALSE.




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

Текущий архив: 2002.07.01;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.012 c
3-914
DAK
2002-06-07 14:54
2002.07.01
Автоинкрементные поля


7-1226
KPY
2002-04-02 11:49
2002.07.01
Com порт к вопросу о бите четности


14-1200
MaximatorVeter
2002-05-24 20:52
2002.07.01
Кто знает какая существует самая серьезная разработка на Delphi?


1-954
hunter
2002-06-18 18:12
2002.07.01
Изменить ресурс в exe


14-1189
Independence
2002-05-31 11:18
2002.07.01
Подскажите, как перекомпиллировать библиотеку?