News:

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

Scroll demo

Started by Vortex, July 06, 2005, 08:18:14 AM

Previous topic - Next topic

Vortex

Here is an algo to create scrolling effect on the desktop:
Quote
.386
.model flat,stdcall
option casemap:none

include   \masm32\include\windows.inc
include   \masm32\include\kernel32.inc
include   \masm32\include\user32.inc
include   \masm32\include\gdi32.inc

includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\gdi32.lib

.data?
x   dd ?
y   dd ?
counter   dd ?
hdc   dd ?

.code

start:
   invoke   GetSystemMetrics,SM_CXSCREEN
   mov   x,eax
   invoke   GetSystemMetrics,SM_CYSCREEN
   mov   y,eax
   shr   eax,1
   mov   counter,eax
   invoke   GetDC,0
   mov   hdc,eax
@@:
   invoke   BitBlt,hdc,1,1,x,y,hdc,0,0,SRCCOPY
   dec   y
   dec   counter
   jnz   @b
   invoke   ReleaseDC,0,hdc
   invoke   ExitProcess,NULL

END start

[attachment deleted by admin]

Phil

Super sweet and simple! Thanks Vortex ...

hutch--

Vortex,

You have started a monster.  :bg

Here is a hscroll demo.



[attachment deleted by admin]
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Vortex

That's nice Hutch  :U

Rifleman

Hutch,
That is very kewl!  And it does not mess up the display!

Paul

Phil

And here's a variation one, using Hutch's template, for those who prefer to view from right to left!


[attachment deleted by admin]

Vortex

Here is my classical bouncing window example  :toothy

[attachment deleted by admin]

Phil

Yeah, that's cool! It would certainly be difficult to close it after a few too many! Took me about 15 seconds to finally hit the right spot and all I've been drinking is tea!

Vortex

Hi Phil,

Yes, that window,it's difficult to catch. :toothy