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

Вниз

KOL - 2.10 - KeyPreview   Найти похожие ветки 

 
raskin ©   (2005-08-10 21:30) [0]

В Kol 2.10 мне не удалось по умолчанию настроить KeyPreview в PAS_VERSION  (FPC, KOL для Delphi, Win98). Предлагаю следующее изменение: в TControl.WndProc, проверку FHandle=GetFocus() не производить, если сообщение WM_KEYDOWN (эта проверка введена для WM_KEYUP, судя по комментариям). Возможно, как я пока сделал, для надёжности добавить переменную типа longint с именем KeyPreviewCounter и перед передачей с 3960? й строки ParentForm.Perform, увеличивать KeyPreviewCounter, а при обработке TControl.WndProc в случае FHandle<>GetFocus() уменьшать KeyPreviewCounter (если он положителен) и поступать по-старому (прекращать обработку), если он 0


 
thaddy   (2005-08-10 23:13) [1]

You can simply handle WM_KEYUP in a global OnMessage handler.
If you set result:=true, the key is silenty removed:

Like:
function TForm1.DoMessage(var Msg:TMsg;var Rslt:integer):Boolean;
begin
 Result:=false;
 // ignore escape
 if (msg.message = WM_KEYUP) and (msg.wparam = VK_ESCAPE) then result:=true;
end;


 
raskin ©   (2005-08-11 13:08) [2]

Really I"ve no problem with Redundant WM_KEUP"s, but the problem was with the KeyPreviewing. I"ve found the solution that "works for me", but found it useful to share found information - I hope it"llbe useful for everyone to know about the problem (and the way to solve it).



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

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

Наверх





Память: 0.44 MB
Время: 0.044 c
2-1142597681
nyron
2006-03-17 15:14
2006.04.02
помогите плиз с excel


15-1142254134
Ironkad
2006-03-13 15:48
2006.04.02
вопрос


1-1140966751
Конопелька
2006-02-26 18:12
2006.04.02
Выделение области для перетаскивания формы.


15-1141377982
Некто
2006-03-03 12:26
2006.04.02
хех =) Баян наверно


1-1141008643
Чертежник
2006-02-27 05:50
2006.04.02
Не рисует на канве





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
Английский Французский Немецкий Итальянский Португальский Русский Испанский