Hi!

I have made a Textscroller (you should know what it is) and I want to choose another Font than the standard Font.
So here is my code:

.if uMsg == WM_INITDIALOG
invoke GetWindowRect,hwndDlg,addr Rct
mov Rct.left,130
mov Rct.right,130

invoke SetTimer,hwndDlg,NULL,100,NULL

.elseif uMsg == WM_TIMER
invoke GetDC,hwndDlg
mov hDC,eax

; Choose same color as the backround of the window has (grey)
RGB 192,192,192
invoke SetTextColor,hDC,eax

invoke SetBkMode,hDC,TRANSPARENT

; Draw grey text at the old position to clear it out
invoke DrawText,hDC,addr TheText,-1,addr Rct,DT_CENTER or DT_NOCLIP

; Change position
sub Rct.top,2

; choose "visible" text color (black)
RGB 0,0,0
invoke SetTextColor,hDC,eax

invoke SetBkMode,hDC,TRANSPARENT

; Draw black text at the new position
invoke DrawText,hDC,addr TheText,-1,addr Rct,DT_CENTER or DT_NOCLIP

invoke ReleaseDC,hwndDlg,hDC

So how can I choose another font, so that it doesn't look like the ordinary system font
(see picture)
Posted on 2003-02-09 03:55:22 by ChigpA
You should use CreateFont to select a diffrent font, and then
use SelectObject use it.
Posted on 2003-02-09 09:37:35 by Guerrilla
thanx ... I'll try
Posted on 2003-02-09 10:21:57 by ChigpA
So my Textscroller is working now, but how I should do that it starts again when it has "run out of" the window.
I've tried around, but ... no idea so long

thx for help
Posted on 2003-02-10 06:49:08 by ChigpA
did you try mov Rct.top, -20 or something like this?



CMP Rct.top, <HEIGHT OF YOUR DIALOG>
JNG @F

MOV Rct.top, -20

@F: ...


funzt ???
Posted on 2003-02-10 08:58:27 by mob
Jo, das funzt! Geht gut ab!

Dankesch?n...
Posted on 2003-02-10 09:36:59 by ChigpA
eeek, spare me, please ... there's nothing more worse on this planet
than german slang. however, good luck with your scroller...

no offense
Posted on 2003-02-10 10:02:53 by mob

eeek, spare me, please ... there's nothing more worse on this planet
than german slang.


Full ack! ;)
Posted on 2003-02-10 10:04:37 by bazik