flat assembler
Message board for the users of flat assembler.
Index
> Windows > Question about window text setting. |
Author |
|
Mikl___ 16 Feb 2015, 08:17
Hi, KostX !
See alternative lessons of Iczelion --> Lesson #4B |
|||
16 Feb 2015, 08:17 |
|
baldr 16 Feb 2015, 09:40
KostX,
Had you meant 'counted' (AKA Pascal/Delphi) strings, like db 13, "Hello, world!"? You may simply poke zero byte right behind the last used byte (provided there is spare byte there) and pass appropriate address to WinAPI (it may not work if that string contains zero byte). AFAIK Delphi ANSIString and WideString types are made specifically to be compatible with WinAPI (they have length and refcount fields at negative offsets and ensure NUL termination). |
|||
16 Feb 2015, 09:40 |
|
AsmGuru62 16 Feb 2015, 12:50
The way to do it is dynamically allocate room for the characters you want to set and a terminating null character.
Then copy text, terminate it and then use SetWindowText(). |
|||
16 Feb 2015, 12:50 |
|
Force 18 Feb 2015, 17:17
|
|||
18 Feb 2015, 17:17 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.