hi, i'm new to win32 assembly,
here is my problem
how can i generate a bitmap consist of a string....
for example,
i have a string "i love assembly", how can i generate a bitmap image consist of the string?
You create the bitmap in memory, and draw the string onto the bitmap, and then you can save it to a file (or do whatever you want.)
Next question: how do I do that? :bg
You can create the bitmap and then draw the string directly to it. It will go something like this, I just typed this without testing it so it might need a bit of tweaking...
invoke GetDC, [hWinMain]
mov [hdc], eax
invoke CreateCompatibleBitmap, [hdc], 500, 500
mov [hBmp], eax
invoke CreateCompatibleDC, [hdc]
mov [memDC], eax
invoke ReleaseDC, [hdc]
mov D[rect.top], 0
mov D[rect.bottom], 0
mov D[rect.left], 500
mov D[rect.right], 500
invoke DrawText, [memDC], "Hello",1,offset rect,DT_CENTER + DT_VCENTER
invoke DeleteDC, [memDC]