From: Aegis Delacour on
hey, i have a question to anyone that has used this library before
i need to display an image in fullscreen or the actual size of the
shot (the actual size of shot is fullscreen anyway).

but i am getting a few errors, could someone help me figure it out?

this is done in Visual Studio 6
C++

C:\...: error C2065: 'hdc' : undeclared identifier
C:\...: error C2065: 'dest_x' : undeclared identifier
C:\...: error C2065: 'dest_y' : undeclared identifier
C:\...: error C2065: 'width' : undeclared identifier
C:\...: error C2065: 'height' : undeclared identifier

and this is my code

FIBITMAP *fibmp_img = FreeImage_Load(FIF_JPEG, "screen.jpg",
JPEG_DEFAULT);

StretchDIBits(hdc, dest_x, dest_y, width, height, 0, 0, width, height,
FreeImage_GetBits(fibmp_img), FreeImage_GetInfo(fibmp_img),
DIB_RGB_COLORS, SRCCOPY);

FreeImage_Unload(fibmp_img);

i guess its a basic error but i cant figure it out
From: selvam on
you must declare the variable before use in StretchDIBits function.

--
With Regards,
Selvam
http://www.wincpp.com


"Aegis Delacour" wrote:

> hey, i have a question to anyone that has used this library before
> i need to display an image in fullscreen or the actual size of the
> shot (the actual size of shot is fullscreen anyway).
>
> but i am getting a few errors, could someone help me figure it out?
>
> this is done in Visual Studio 6
> C++
>
> C:\...: error C2065: 'hdc' : undeclared identifier
> C:\...: error C2065: 'dest_x' : undeclared identifier
> C:\...: error C2065: 'dest_y' : undeclared identifier
> C:\...: error C2065: 'width' : undeclared identifier
> C:\...: error C2065: 'height' : undeclared identifier
>
> and this is my code
>
> FIBITMAP *fibmp_img = FreeImage_Load(FIF_JPEG, "screen.jpg",
> JPEG_DEFAULT);
>
> StretchDIBits(hdc, dest_x, dest_y, width, height, 0, 0, width, height,
> FreeImage_GetBits(fibmp_img), FreeImage_GetInfo(fibmp_img),
> DIB_RGB_COLORS, SRCCOPY);
>
> FreeImage_Unload(fibmp_img);
>
> i guess its a basic error but i cant figure it out
>
From: Aegis Delacour on
oh right.. ok so interger all the variables..
how do i declare hdc though
From: David Webber on

"Aegis Delacour" <eloquent1(a)gmail.com> wrote in message
news:c430c33b-be84-4161-b107-fee95c91c62f(a)l35g2000pra.googlegroups.com...

> oh right.. ok so interger all the variables..
> how do i declare hdc though

An HDC is a handle to a device context. You not only have to "declare" it
(eg with HDC hdc; ), you have to set it up for the "device" ( eg a window,
a printer, or an area of memory) where the image is to be drawn. This is
fundamental to Windows programming in C or C++, and nothing specifically to
do with the Freeimage library. It would take much too long to explain it
here: I think you need to write some simple windows programs in C or C++
first.

Dave
--
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mozartists/mailinglist.htm

From: selvam on

check with following web for basic windows programming.


http://www.functionx.com/win32/index.htm

--
With Regards,
Selvam
http://www.wincpp.com


"David Webber" wrote:

>
> "Aegis Delacour" <eloquent1(a)gmail.com> wrote in message
> news:c430c33b-be84-4161-b107-fee95c91c62f(a)l35g2000pra.googlegroups.com...
>
> > oh right.. ok so interger all the variables..
> > how do i declare hdc though
>
> An HDC is a handle to a device context. You not only have to "declare" it
> (eg with HDC hdc; ), you have to set it up for the "device" ( eg a window,
> a printer, or an area of memory) where the image is to be drawn. This is
> fundamental to Windows programming in C or C++, and nothing specifically to
> do with the Freeimage library. It would take much too long to explain it
> here: I think you need to write some simple windows programs in C or C++
> first.
>
> Dave
> --
> David Webber
> Author of 'Mozart the Music Processor'
> http://www.mozart.co.uk
> For discussion/support see
> http://www.mozart.co.uk/mozartists/mailinglist.htm
>
>