I,m trying to create a Message box in the following format :-

Label1 db"Text,"
Label2 db"Text,"
Label3 db"Text,"
Label4 db"Text.",0

I've tried various controls at the end of each line, but the Message Box always displays the text as one long line.
can anyone tell me the correct way of doing it?:confused:
Posted on 2003-01-01 13:25:18 by Mel
Just add a LFCR at the end of each string. Like

Label1 db"Text,",10,13

Raymond
Posted on 2003-01-01 13:38:30 by Raymond
All you need is the standard new line characters; 13 & 10 :)

Label1 db 'Text,',13,10
Label2 db 'Text,',13,10
Label3 db 'Text,',13,10
Label4 db 'Text.',0

Raymond was too fast :alright:
Posted on 2003-01-01 13:39:31 by Eóin
You were both too fast for me, I was trying out something else & missed them first time around.
Thanks to both of you :alright:
Posted on 2003-01-01 13:57:28 by Mel
Hi all, easy to understand..Cool

But what about message box display text from clipboard ? ;--).

Regards
Posted on 2003-01-01 21:55:15 by Halong
Halong,

I guess you will have to read the section of the Win32.hlp file dealing with the clipboard to understand what may be implicated. Then, you could either get the clipboard content directly as input to the MessageBox, or you may have to copy it to your memory and load it from there.

Generally, the clipboard only keeps a pointer to the data which you may want to paste.

As an example, I had a little program where I wanted to copy the content of my compatible DC used to update my screen, and pick up that info with another program. When "activated", only the pointer to the bitmap of that DC was kept on the clipboard. Any modification of that bitmap before I would "paste" the clipboard content to the other program would be transmitted.

Furthermore, If I were to close my little program before pasting the content of the clipboard to the other program, the pointer was no longer valid and NOTHING could be pasted.

Have fun.

Raymond
Posted on 2003-01-02 20:02:19 by Raymond
Thank you very much for your instruction.

In fact my question is not useful, but I can take advangtage of what kind of this code to check some thing interesting in other's asm source codes. For me I message box hutch'code 1k smaller than Izcelion's in tut2 is very interesting.

Regards.
Posted on 2003-01-03 02:04:50 by Halong
Halong,

The reason why the example from MASM32 is smaller is because it does not use a .DATA section as Iczelion's tute 2 does. This is fine for very small stuff where the text is read only but most larger files use a .DATA section for data that is initialised, IE has some predefined content, and often use an unitialised data section as well where space is required without an initial value.

Regards,

hutch@movsd.com
Posted on 2003-01-03 04:53:33 by hutch--
Dear Hutch

Thank you for your instruction and what you have done for the world.
I understand that for I have read your includes in newest version [ Mob..make me -() ]

If Microsoft and Intel will be down. Many people like me would like to see Message box. ASM pure and simple :-). Great work !
Posted on 2003-01-03 18:44:24 by Halong