flat assembler
Message board for the users of flat assembler.
Index
> Windows > TextOut not working... |
Author |
|
Vasilev Vjacheslav 01 Jun 2007, 18:56
you must use another dc created with CreateCompatibleDC, so this is a pseudo-algo:
Code: hdc=GetDC(0); hcdc=CreateCompatibleDC(hdc); SetBkColor(hcdc,0); SetTextColor(hcdc,0ffffff); TextOut(hcdc,...); BitBlt(hdc,...,hcdc,0,0,SRCCOPY); |
|||
01 Jun 2007, 18:56 |
|
Yardman 01 Jun 2007, 19:11
[ Post removed by author. ]
Last edited by Yardman on 04 Apr 2012, 02:22; edited 1 time in total |
|||
01 Jun 2007, 19:11 |
|
Frank 01 Jun 2007, 21:16
JapanLover,
you need to invoke GdiFlush after TextOut, but before ExitProcess (read the Win32 help on GdiFlush for explanation). Your original code works after two minor changes: Code: ; Change 1: invoke TextOut,ebp,10,40,Text,5 invoke GdiFlush invoke ExitProcess,0 ; Change 2: import gdi,\ TextOut,'TextOutA',\ SetBkColor,'SetBkColor',\ SetTextColor,'SetTextColor',\ GdiFlush,'GdiFlush' |
|||
01 Jun 2007, 21:16 |
|
JapanLover 02 Jun 2007, 03:08
well, i think i've got it all working and figured out for now...
thanks for quick replies and great help guys =) |
|||
02 Jun 2007, 03:08 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.