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

Вниз

wm_GetText ???   Найти похожие ветки 

 
maxistent ©   (2004-10-09 18:13) [0]

Люди, привет! Кто знает, как использовать wm_GetText? Там нужны какие-то указатели... SendMessage(MyHandle, wm_GetText, ?, ?) :(


 
XProger ©   (2004-10-09 21:36) [1]


var
textbuffer : PChar;
....
GetMem(textbuffer, TEXTBUFFERSIZE);
SendMessage(MemoHandle, WM_GETTEXT, 0, Longint(textbuffer));


 
maxistent ©   (2004-10-10 16:42) [2]

после этого:


procedure TForm1.Button1Click(Sender: TObject);
var
textbuffer : PChar;
begin
GetMem(textbuffer, 5);
SendMessage(MyHandle, WM_GETTEXT, 0, Longint(textbuffer));
Form1.Caption:=StrPas(TextBuffer);
end;


у Формы в заголовке закорючки какие-то... Как быть?


 
GuAV ©   (2004-10-10 16:45) [3]

WM_GETTEXT  
wParam = (WPARAM) cchTextMax;   // number of characters to copy
lParam = (LPARAM) lpszText;     // address of buffer for text


 
maxistent ©   (2004-10-10 19:09) [4]

А-а-а... понятно. Спасибо.


 
DVM ©   (2004-10-10 22:50) [5]

function GetTextFromWindow(hWnd: HWND): string;
var
 TextLength: Integer;
 Text: PChar;
begin
 TextLength := SendMessage(hWnd, WM_GETTEXTLENGTH, 0, 0);
 if TextLength = 0 then Result := ""
 else
 begin
   GetMem(Text, TextLength + 1);
   SendMessage(hWnd, WM_GETTEXT, TextLength + 1, longint(Text));
   Result := Text;
   FreeMem(Text);
 end;
end; // End of function GetTextFromWindow



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

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

Наверх




Память: 0.47 MB
Время: 0.054 c
1-1099423039
dolphin
2004-11-02 22:17
2004.11.21
Собития в динамически создаваемых формах


1-1099911070
UK-AAV
2004-11-08 13:51
2004.11.21
Не работает печать форм


1-1099661604
GIL
2004-11-05 16:33
2004.11.21
как узнать запущен ли процесс с определенным именем?


1-1100076951
LEXX_55
2004-11-10 11:55
2004.11.21
Нужна помощь! Файл сохраняется не там где надо!


3-1098163052
YurikGL
2004-10-19 09:17
2004.11.21
Существует ли IbDataset с реализованным свойством filter?