I'm using Delphi 6.
This is regarding sending API commands in delphi!
I am wondering why "EM_FINDTEXT" causes an error in delphi. "EM_SETSEL" does not cause an error, and other "EM_"'s and "WM_"'s work. I can only get certain "EM_"s to work.
EM_FINDTEXT causes the following error in Delphi:
[Error] Unit1.pas(154): Undeclared identifier: 'EM_FINDTEXT'
I looked up "EM_FINDTEXT on google..I found code snippets that other people had written, but no information as to why I would be getting the error. Am I missing a "uses" or a delphi unit?
Sample example (simple) code, just for testing.
//Selects some specified characters in NOTEPAD
procedure TForm1.Button2Click(Sender: TObject);
var
handle: HWND;
begin
handle:=3036; //handle of the edit box
SendMessage(handle, EM_SETSEL,1,5);
end;
procedure TForm1.Button2Click(Sender: TObject);
var
handle: HWND;
begin
handle:=3036; //handle of the edit box, found using a spy program
SendMessage(handle, EM_FINDTEXT,0,0);
end;
end.
Thank you.
phpl
This is regarding sending API commands in delphi!
I am wondering why "EM_FINDTEXT" causes an error in delphi. "EM_SETSEL" does not cause an error, and other "EM_"'s and "WM_"'s work. I can only get certain "EM_"s to work.
EM_FINDTEXT causes the following error in Delphi:
[Error] Unit1.pas(154): Undeclared identifier: 'EM_FINDTEXT'
I looked up "EM_FINDTEXT on google..I found code snippets that other people had written, but no information as to why I would be getting the error. Am I missing a "uses" or a delphi unit?
Sample example (simple) code, just for testing.
//Selects some specified characters in NOTEPAD
procedure TForm1.Button2Click(Sender: TObject);
var
handle: HWND;
begin
handle:=3036; //handle of the edit box
SendMessage(handle, EM_SETSEL,1,5);
end;
procedure TForm1.Button2Click(Sender: TObject);
var
handle: HWND;
begin
handle:=3036; //handle of the edit box, found using a spy program
SendMessage(handle, EM_FINDTEXT,0,0);
end;
end.
Thank you.
phpl