Autor Beitrag
kabizolis
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 86



BeitragVerfasst: Fr 17.06.05 17:12 
wie kann man eine variable (string) in eine messagebox übergeben....

beispiel variable:

ausblenden Quelltext
1:
eingabe := 'Guten Tag, wie geht's?';					


beispiel messagebox:

ausblenden Delphi-Quelltext
1:
MessageBox(0, eingabe, 'Message', MB_OK or MB_ICONSTOP);					


geht nicht, wieso?
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Fr 17.06.05 17:19 
pchar(eingabe)

dann geht das

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit
kabizolis Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 86



BeitragVerfasst: Fr 17.06.05 17:22 
danke, hab' mir fast die zähne ausgebissen deswegen :D aber wie so oft sind es kleine dinge, die's ausmachen!
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 17.06.05 18:31 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.Button1Click(Sender: TObject);
const
  MyInteger = 5;
resourcestring
  rsMytext = 'Huhu ich bin die %d!';
begin
  Messagebox(Handle, PChar(Format(rsMytext, [MyInteger])), PChar(Application.Title), 0);
end;