From: Aegis Delacour on 9 Sep 2009 22:51 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 9 Sep 2009 23:31 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 10 Sep 2009 02:30 oh right.. ok so interger all the variables.. how do i declare hdc though
From: David Webber on 10 Sep 2009 03:33 "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 10 Sep 2009 05:11 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 > >
|
Next
|
Last
Pages: 1 2 Prev: SetTimer not calling OnTimer? Next: VS 2005 - Kann keinen Datenbreakpoint anlegen |