Re: Set Gadget Font via Windows API
Posted: Mon Apr 10, 2017 4:39 pm
Well that's the right waybmcs wrote:No doubt I will give PB another try, but I will write a lot more "fun" code and pester you folks before I tackle a "real" job.

http://www.purebasic.com
https://www.purebasic.fr/english/
Well that's the right waybmcs wrote:No doubt I will give PB another try, but I will write a lot more "fun" code and pester you folks before I tackle a "real" job.
Therefore, I have changed the line :Line 20 - Overflow in a dynamically allocated memory block
Code: Select all
txtBuffer = AllocateMemory(length) : PokeS(txtBuffer, txt$, -1, #PB_Unicode)
Code: Select all
txtBuffer = AllocateMemory(length * 2) : PokeS(txtBuffer, txt$, -1, #PB_Unicode | #Pb_String_NoZero)