News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Scrolling text flickers?

Started by hfheatherfox07, May 18, 2011, 09:04:04 PM

Previous topic - Next topic

hfheatherfox07

@ qWord I am beginning to think that the problem is with the dialog -WndProc PROC ... your method seems to work fine with every thing that I tried using just a WndProc PROC dialog ...
This starfiled if you remember I converted from a full screen, and I use a different method a WinMain proc and a WndProc... I was unsuccessful in just using a WndProc and a simple:
INVOKE DialogBoxParam, hInstance, IDD_DLG1 , NULL, ADDR WndProc, 0
INVOKE ExitProcess, 0

Do you think you can give that a try? I think that would solve this problem ... I tried for days and this was the only way to get this starfiled to work with a rsrc.rc  ::)


qWord

hi,

it is really disappointing to see such code ...
- there was a lot of useless code
- useless/unused global variables
- global variables that could (and should) be local
- handle leaks
- usage of uninitialized variables (hDlg) -> AFAIKS this was the reason why the text doesn't scroll.
- the stars are only visible because you invalidate the window in each iteration of the message loop (!) and because they are drawn while handling WM_PAINT. This is not the idea of using timers and layers: you drawing interval is controlled by a timer (WM_TIMER, timer-ID)  and the layers are only combined while handling WM_PAINT.

(I've used a resource ID in the call to CreateDialogParam -> you must change this to get it work)

FPU in a trice: SmplMath
It's that simple!

hfheatherfox07

Thanks qWord ...

I had no idea how to handle the actual star creation.... did not realize that you can put them in a DrawStars proc .....I kept adding them to WM_TIMER

I am going to have to compare the one you made with my bad once to figure out  all the mistakes that I made and understand them.....

Thank you again  :bg