Unable to open include file 'SCRNSAVE.H'
Håper noen kan hjelpe meg.
Jeg bruker Borland 5.0, og lager en screensaver for Win95.
Takk på forhånd.
Hilsen: Lars Andre
lan...@cyberdude.com
--------------------------------------------------------------------------------
#include <windows.h>
#include <scrnsave.h>
/* This is the message */
char str[80] = "#Horten er den beste kanalen";
/* This is the timer delay */
int delay = 200;
LRESULT CALLBACK ScreenSaverProc(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam)
{
static HDC hdc;
static timer;
static RECT scrdim;
static SIZE size;
static X = 0, Y = 0;
static HBRUSH hBlkBrush;
static TEXTMETRIC tm;
switch(message)
{
case WM_CREATE:
timer = SetTimer(hwnd, 1, delay, NULL);
hBlkBrush = GetStockObject(BLACK_BRUSH);
break;
case WM_ERASEBKGND:
hdc = GetDC(hwnd);
GetClientRect(hwnd, &scrdim);
SelectObject(hdc, hBlkBrush);
PatBlt(hdc, 0, 0, scrdim.right, scrdim.bottom, PATCOPY);
GetTextMetrics(hdc, &tm);
GetTextExtentPoint32(hdc, str, strlen(str), &size);
releaseDC(hwnd, hdc);
break;
case WM_TIMER:
hdc = GetDC(hwnd);
SelectObject(hdc, hBlkBrush);
PatBlt(hdc, X, Y, X + size.cx, Y + size.cy, PATCOPY);
X += 10; Y += 10;
if(X > scrdim.right) X = 0;
if(Y > scrdim.bottom) Y = 0;
SetBkColor(hdc, RGB(0, 0, 0));
SetTextColor(hdc, RGB(0, 255, 255));
TextOut(hdc, X, Y, str, strlen(str));
ReleaseDC(hwnd, hdc);
break;
case WM_DESTROY:
KillTimer(hwnd, timer);
break;
default:
return DefScreenSaverProc(hwnd, message, wParam, lParam);
}
return 0;
}
BOOL CALLBACK ScreenSaverConfigureDialog(HWND hdwnd, UINT message,
WPARAM wParam, LPARAM, lParam)
{
return 0;
}
BOOL WINAPI RegisterDialogClasses(HINSTANCE hInst)
{
return 1;
}
>
> Jeg får følgende feil melding:
>
> Unable to open include file 'SCRNSAVE.H'
>
> Håper noen kan hjelpe meg.
>
> Jeg bruker Borland 5.0, og lager en screensaver for Win95.
>
> Takk på forhånd.
> #include <windows.h>
> #include <scrnsave.h>
Kanskje #include "scrnsave.h" ville hjelpe?
--
-jk
Jan Kroken <ja...@maud.ifi.uio.no> wrote in article
<vhi7ml8...@maud.ifi.uio.no>...
>Ligger ikke scrnsave.h i katalogen \bc5\include\win32
>skriv da:
>#include <win32\scrnsave.h>
>OGMalin
Jupp.
Tusen takk for hjelpen folkens.
Hilsen: Lars Andre
lan...@image.no
http://home.sol.no/landas/