programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

Re: Screen Saver

From: Azedia of DOLFINA <dolfina_at_dolfina.org>
Date: Thu, 9 May 2002 12:34:49 -0700

Apparently, there is a Screen Saver Class in the Win API. Some key elements
has to do with not sending to DefWindowProc but to DefScreenSaverProc,
running a timer, turn on/off input from mouse and keyboard, and maybe some
others I have not yet figured out yet.

I added WM_PAINT to the SWITCH in order to paint a string to the screen
and
it worked ok but I do not know how to paint graphics to screen yet. I would
like to
be able to show graphics files. I am still working on it.

:PAINT ( -- )
    HWND PAD beginPaint ( hdc )
    HWND HERE GetClientRect DROP
    ( hdc ) S" Show Screen Saver Text" HERE
       DT SINGLELINE DT_CENTER OR DT_VCENTER OR DrawText DROP
    HWND PAD EndPaint DROP ;

[SWITCH SAVER-MESSAGES DEFWINPROC ( msg -- res )
   WM_DESTROY RUNS SS-DESTROY
   WM_CLOSE RUNS SS-CLOSE
   WM_SETCURSOR RUNS SS-CURSOR
   WM_KEYDOWN RUNS SS-END
   WM_SYSKEYDOWN RUNS SS-END
   WM_LBUTTONDOWN RUNS SS-END
   WM_RBUTTONDOWN RUNS SS-END
   WM_MBUTTONDOWN RUNS SS-END
   WM_MOUSEMOVE RUNS SS-MOVED
   WM_SYSCOMMAND RUNS SS-SYSCOMMAND
   WM_CREATE RUNS SS-CREATE
   WM_ACTIVATE RUNS SS-DEACTIVATE
   WM_ACTIVATEAPP RUNS SS-DEACTIVATE
   WM_NCACTIVATE RUNS SS-DEACTIVATE
   USER_TIMER RUNS SS-TIMER
    WM_PAING RUNS PAINT /added WM_PAINT to paint to screen
SWITCH]

> I think your email was mis-directed. I haven't been doing anything with
> screen savers. However, I would be interested in hearing what you found
> out. I never could figure out how the screen saver examples worked.
>
> -----Original Message-----
> From: Azedia of DOLFINA [mailto:dolfina_at_dolfina.org]
> Sent: Saturday, May 04, 2002 8:30 PM
> To: Bob Nash
> Subject: Re: [sftalk] Screen Saver
>
>
> OIC: very cool! I just tried out the Template Expander with the Sample
> Template. It worked the first time. I just pasted from the buffer.
>
> Jodell
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
----------------------------------------------------------------------
sftalk_at_forth.com      The SwiftForth programming discussion email list
To unsubscribe,  send subject "unsubscribe sftalk" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/sftalk -- check them out!
Search the archives!    Visit http://www.forth.com/search for details.
Received on Thu May 09 2002 - 12:36:19 PDT

This archive was generated by hypermail 2.2.0 : Fri Nov 21 2008 - 03:04:23 PST