Where to get a tutorial or "howto" for create a screensaver with Borland C++ ?

Hello,
    I need to learn how to create a screensaver with borland C++. I want to use the scrnsave.lib and the functions included in...
    So, first of all : WHERE may i found the "scrnsave.lib" that can be linked with the BC++ compiler ???
    After that, i need a tutorial (it can be a link to a web page, .ps document, .doc document or something else) explaining how to use it !

Thank you !
LVL 1
AlexanderAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
AlexVirochovskyConnect With a Mentor Commented:
Examples and short tutorials you can find in
http://dialspace.dial.pipex.com/town/square/fc77/hobbies/screen/screen.htm
http://www.users.globalnet.co.uk/~monster/Pages/Code/savecode.htm
http://progsource.com/c_windows.html
http://www.leadingedge.com/download.htm
http://members.xoom.com/BadMunky/SourceCode.html

Plus  in www.codeguru.com you can
find interactive ScreanSaver of Chensu
(but with MFC).
Example with MFC tou can find , too, in
BC5\EXAMPLES\MFC\GENERAL\SAVER
I hope, it helps. Alex

BTW: file scrnsave.lib is part of Windows SDK: you can find it in MSDN or I can send you(write you EMail), but
must test: can/can't work this lib with
BC!
0
 
AlexanderAuthor Commented:
NB - the exemple included with Borland C++ uses OWL, and i dont want to use it !
0
 
AlexanderAuthor Commented:
It seems to be the answer what i was looking for...
But in fact i want to do it by using directly the API Windows functions or DirectX (DirectDraw) functions. Because i want to be able to compile it under VC++, Borland C++ and Borland C++ Builder... (it could be only a dream...)
I've heared that a .scr is a simple .exe that takes "care" of some special parameters... so i'm looking for information about it...

So, thank you anyway ! But if you can help me about it, please, help me !!!
;)
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
AlexVirochovskyCommented:
Hi, i thing, that screensaver diffents
from usual exe mainly working with
parameters. See next small example:
int PASCAL
WinMainN( HINSTANCE hInst, HINSTANCE hPrev, LPTSTR szCmdLine, int nCmdShow )
{
   LPCTSTR pch = szCmdLine;
//   HWND hParent = 0;
   OSVERSIONINFO osvi;

   hMainInstance = hInst;

   osvi.dwOSVersionInfoSize = sizeof(osvi);
   fOnWin95 = (GetVersionEx(&osvi) &&
                osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS);

      for(;;) switch( *pch )
      {
          case TEXT('S'):
          case TEXT('s'):
              return DoScreenSave( NULL );

          case TEXT('L'):
          case TEXT('l'):
              // special switch for tests such as WinBench
              // this is NOT a hack to make bechmarks look good
              // it's a hack to allow you to benchmark a screen saver
              // many bechmarking apps require the whole screen in foreground
              // which makes it hard to measure how a screensaver adds CPU load
              // you must provide a parent window (just like preview mode)
              preview_like_fullscreen = TRUE;
          case TEXT('P'):
          case TEXT('p'):
              do pch++; while( *pch == TEXT(' ') );  // skip to the good stuff
              return DoSaverPreview( pch );

          case TEXT('A'):
          case TEXT('a'):
              if (!fOnWin95)
                  return -1;
              do pch++; while( *pch == TEXT(' ') );  // skip to the good stuff
              return DoChangePw( pch );

          case TEXT('C'):
          case TEXT('c'):
              return DoConfigBox( GetForegroundWindow() );

          case TEXT('\0'):
              return DoConfigBox( NULL );

          case TEXT(' '):
          case TEXT('-'):
          case TEXT('/'):
              pch++;   // skip spaces and common switch prefixes
              break;

          default:
              return -1;
      }

}
I 've make template of SS (from one of examples,that i 've sent you) for Borland without OWL/MFC. If you want, i can send you all stuff(write you EMail).
Alex
0
 
AlexanderAuthor Commented:
ok, it seems that it is what i'm looking for, can you send me "all stuf" to al_espin@hotmail.com ?
thank you !
0
 
AlexVirochovskyCommented:
Done
0
All Courses

From novice to tech pro — start learning today.