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

Вниз

Какое сообщение возникает при изменении что либо на форме   Найти похожие ветки 

 
Arnold ©   (2004-09-23 12:17) [0]

Какое сообщение возникает при изменении что либо на форме ну например при прокручивании полосы прокрутки на компоненте datagrid владельцем которого является форма.


 
easy ©   (2004-09-23 14:26) [1]

unit Unit1;

interface

uses
 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 Dialogs, AppEvnts, StdCtrls;

type
 TForm1 = class(TForm)
   Memo1: TMemo;
   ApplicationEvents1: TApplicationEvents;
   procedure ApplicationEvents1Message(var Msg: tagMSG;
     var Handled: Boolean);
 private
   { Private declarations }
 public
   { Public declarations }
 end;

var
 Form1: TForm1;

implementation

{$R *.dfm}
function MsgToStr(WM: word): String;
begin
case WM of
   WM_ACTIVATE : result:= "WM_ACTIVATE ";
   WM_ACTIVATEAPP : result:= "WM_ACTIVATEAPP ";
   WM_CANCELMODE : result:= "WM_CANCELMODE ";
   WM_CHAR : result:= "WM_CHAR ";
   WM_CHARTOITEM : result:= "WM_CHARTOITEM ";
   WM_CLOSE : result:= "WM_CLOSE ";
   WM_COMMAND : result:= "WM_COMMAND ";
   WM_COMMNOTIFY : result:= "WM_COMMNOTIFY ";
   WM_COMPACTING : result:= "WM_COMPACTING ";
   WM_COMPAREITEM : result:= "WM_COMPAREITEM ";
   WM_CREATE : result:= "WM_CREATE ";
   WM_CTLCOLOR : result:= "WM_CTLCOLOR ";
   WM_DELETEITEM : result:= "WM_DELETEITEM ";
   WM_DESTROY : result:= "WM_DESTROY ";
   WM_DEVMODECHANGE : result:= "WM_DEVMODECHANGE ";
   WM_ENABLE : result:= "WM_ENABLE ";
   WM_ENDSESSION : result:= "WM_ENDSESSION ";
   WM_ENTERIDLE : result:= "WM_ENTERIDLE ";
   WM_ERASEBKGND : result:= "WM_ERASEBKGND ";
   WM_FONTCHANGE : result:= "WM_FONTCHANGE ";
   WM_GETDLGCODE : result:= "WM_GETDLGCODE ";
   WM_GETFONT : result:= "WM_GETFONT ";
   WM_GETMINMAXINFO : result:= "WM_GETMINMAXINFO ";
   WM_GETTEXT : result:= "WM_GETTEXT ";
   WM_GETTEXTLENGTH : result:= "WM_GETTEXTLENGTH ";
   WM_HSCROLL : result:= "WM_HSCROLL ";
   WM_HSCROLLCLIPBOARD : result:= "WM_HSCROLLCLIPBOARD ";
   WM_ICONERASEBKGND : result:= "WM_ICONERASEBKGND ";
   WM_INITDIALOG : result:= "WM_INITDIALOG ";
   WM_INITMENU : result:= "WM_INITMENU ";
   WM_INITMENUPOPUP : result:= "WM_INITMENUPOPUP ";
   WM_KEYDOWN : result:= "WM_KEYDOWN ";
   WM_KEYUP : result:= "WM_KEYUP ";
   WM_KILLFOCUS : result:= "WM_KILLFOCUS ";
   WM_LBUTTONDBLCLK : result:= "WM_LBUTTONDBLCLK ";
   WM_LBUTTONDOWN : result:= "WM_LBUTTONDOWN ";
   WM_LBUTTONUP : result:= "WM_LBUTTONUP ";
   WM_MBUTTONDBLCLK : result:= "WM_MBUTTONDBLCLK ";
   WM_MBUTTONDOWN : result:= "WM_MBUTTONDOWN ";
   WM_MBUTTONUP : result:= "WM_MBUTTONUP ";
   WM_MEASUREITEM : result:= "WM_MEASUREITEM ";
   WM_MENUCHAR : result:= "WM_MENUCHAR ";
   WM_MENUSELECT : result:= "WM_MENUSELECT ";
   WM_MOVE : result:= "WM_MOVE ";
   WM_NCACTIVATE : result:= "WM_NCACTIVATE ";
   WM_NCCALCSIZE : result:= "WM_NCCALCSIZE ";
   WM_NCCREATE : result:= "WM_NCCREATE ";
   WM_NCDESTROY : result:= "WM_NCDESTROY ";
   WM_NCHITTEST : result:= "WM_NCHITTEST ";
   WM_NCPAINT : result:= "WM_NCPAINT ";
   WM_NCLBUTTONDBLCLK : result:= "WM_NCLBUTTONDBLCLK ";
   WM_NCLBUTTONDOWN : result:= "WM_NCLBUTTONDOWN ";
   WM_NCLBUTTONUP : result:= "WM_NCLBUTTONUP ";
   WM_NCMBUTTONDBLCLK : result:= "WM_NCMBUTTONDBLCLK ";
   WM_NCMBUTTONDOWN : result:= "WM_NCMBUTTONDOWN ";
   WM_NCMBUTTONUP : result:= "WM_NCMBUTTONUP ";
   WM_NCMOUSEMOVE : result:= "WM_NCMOUSEMOVE ";
   WM_NCRBUTTONDBLCLK : result:= "WM_NCRBUTTONDBLCLK ";
   WM_NCRBUTTONDOWN : result:= "WM_NCRBUTTONDOWN ";
   WM_NCRBUTTONUP : result:= "WM_NCRBUTTONUP ";
   WM_NEXTDLGCTL : result:= "WM_NEXTDLGCTL ";
   WM_PAINT : result:= "WM_PAINT ";
   WM_PALETTECHANGED : result:= "WM_PALETTECHANGED ";
   WM_PALETTEISCHANGING : result:= "WM_PALETTEISCHANGING ";
   WM_PARENTNOTIFY : result:= "WM_PARENTNOTIFY ";
   WM_POWER : result:= "WM_POWER ";
   WM_QUERYENDSESSION : result:= "WM_QUERYENDSESSION ";
   WM_QUERYNEWPALETTE : result:= "WM_QUERYNEWPALETTE ";
   WM_QUERYOPEN : result:= "WM_QUERYOPEN ";
   WM_QUIT : result:= "WM_QUIT ";
   WM_RBUTTONDBLCLK : result:= "WM_RBUTTONDBLCLK ";
   WM_RBUTTONDOWN : result:= "WM_RBUTTONDOWN ";
   WM_RBUTTONUP : result:= "WM_RBUTTONUP ";
   WM_RENDERALLFORMATS : result:= "WM_RENDERALLFORMATS ";
   WM_RENDERFORMAT : result:= "WM_RENDERFORMAT ";
   WM_SETFOCUS : result:= "WM_SETFOCUS ";
   WM_SETFONT : result:= "WM_SETFONT ";
   WM_SETREDRAW : result:= "WM_SETREDRAW ";
   WM_SETTEXT : result:= "WM_SETTEXT ";
   WM_SHOWWINDOW : result:= "WM_SHOWWINDOW ";
   WM_SIZE : result:= "WM_SIZE ";
   WM_SYSCHAR : result:= "WM_SYSCHAR ";
   WM_SYSCOLORCHANGE : result:= "WM_SYSCOLORCHANGE ";
   WM_SYSCOMMAND : result:= "WM_SYSCOMMAND ";
   WM_SYSKEYDOWN : result:= "WM_SYSKEYDOWN ";
   WM_SYSKEYUP : result:= "WM_SYSKEYUP ";
   WM_SYSTEMERROR : result:= "WM_SYSTEMERROR ";
   WM_TIMECHANGE : result:= "WM_TIMECHANGE ";
   WM_TIMER : result:= "WM_TIMER ";
   WM_USER : result:= "WM_USER ";
   WM_VKEYTOITEM : result:= "WM_VKEYTOITEM ";
   WM_VSCROLL : result:= "WM_VSCROLL ";
   WM_WINDOWPOSCHANGED : result:= "WM_WINDOWPOSCHANGED ";
   WM_WINDOWPOSCHANGING : result:= "WM_WINDOWPOSCHANGING ";
   WM_WININICHANGE : result:= "WM_WININICHANGE ";
   BM_GETSTATE: result:= "BM_GETSTATE ";
   BM_CLICK: result:= "BM_CLICK ";
   BM_GETCHECK: result:= "BM_GETCHECK ";
   BM_GETIMAGE: result:= "BM_GETIMAGE ";
   BM_SETCHECK: result:= "BM_SETCHECK ";
   BM_SETSTATE: result:= "BM_SETSTATE ";
   BM_SETIMAGE: result:= "BM_SETIMAGE ";
   BM_SETSTYLE: result:= "BM_SETSTYLE ";
   WM_MOUSEMOVE: result:= "WM_MOUSEMOVE ";
   WM_DRAWITEM: result:= "WM_DRAWITEM ";
   else result := inttohex(WM,6);
   end;
end;

procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;
 var Handled: Boolean);
begin
 memo1.Lines.Add(MsgToStr(Msg.message));
end;

end.


 
GuAV ©   (2004-09-24 00:13) [2]

Круто! Но имхо лучше не код писать, а ws32.exe юзать :)



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

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

Наверх




Память: 0.47 MB
Время: 0.034 c
1-1097824953
Dionnis
2004-10-15 11:22
2004.10.31
Закрыть все формы приложения


6-1093336037
Дмитрий Ботвин
2004-08-24 12:27
2004.10.31
Закладка FastNet


1-1098087032
Checist [root]
2004-10-18 12:10
2004.10.31
Хитрый парсинг


4-1096405863
Alex870
2004-09-29 01:11
2004.10.31
Цвет бордюра


14-1097317987
Kerk
2004-10-09 14:33
2004.10.31
Аптека





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