| View previous topic :: View next topic |
| Author |
Message |
LolSalad Grandmaster Cheater
Reputation: 1
Joined: 26 Aug 2007 Posts: 988 Location: Australia
|
Posted: Fri Sep 19, 2008 7:31 pm Post subject: [Answered] ShowMessage from ASM, strange behaviour. |
|
|
(wat is a PAnsiChar)
| Code: | wat := 'lolwat';
asm
mov eax,wat
call ShowMessage
end; |
I took a look at how ShowMessage is called and realised that it takes the message parameter from eax, so I did the above. I just don't understand why it adds whitespace.
http://i33.tinypic.com/2qb6ec4.png
Top is what it does, bottom is what it's supposed to do. Can someone explain why?
Answered my own problem in second reply.
_________________
Last edited by LolSalad on Fri Sep 19, 2008 7:52 pm; edited 1 time in total |
|
| Back to top |
|
 |
&Vage Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Jul 2008 Posts: 1053
|
Posted: Fri Sep 19, 2008 7:46 pm Post subject: |
|
|
| I think it's because you're suppose to change the text of the messagebox first than the title.
|
|
| Back to top |
|
 |
LolSalad Grandmaster Cheater
Reputation: 1
Joined: 26 Aug 2007 Posts: 988 Location: Australia
|
Posted: Fri Sep 19, 2008 7:51 pm Post subject: |
|
|
| _void_ wrote: | | I think it's because you're suppose to change the text of the messagebox first than the title. |
No, ShowMessage only has one parameter, Msg, which is a String.
And, that just happened to be my stupid mistake; I thought I had already tried using String instead of PAnsiChar but I mustn't have, and when I tried it for what I thought was the second time, it worked fine.
_________________
|
|
| Back to top |
|
 |
|