| | |
StretchDIBits
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jun 2005
Posts: 6
Reputation:
Solved Threads: 0
Hi,
I am having problems with the StretchDIBits function. The w->length contains the size of the jpeg. And the w->p contains a pointer to the begining of the jpeg data. Nothing displays onto the screen just a white box. Any Help would be really appriciated.
<< moderator edit: added [code][/code] tags >>
Maldini
I am having problems with the StretchDIBits function. The w->length contains the size of the jpeg. And the w->p contains a pointer to the begining of the jpeg data. Nothing displays onto the screen just a white box. Any Help would be really appriciated.
C Syntax (Toggle Plain Text)
HDC dc = BeginPaint( hwnd, &ps ); BITMAPINFO bmi; memset(&bmi, 0, sizeof(bmi)); bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bmi.bmiHeader.biWidth = 320; bmi.bmiHeader.biHeight = -240; // top-down image bmi.bmiHeader.biPlanes = 1; bmi.bmiHeader.biBitCount = 0; bmi.bmiHeader.biCompression = BI_JPEG; bmi.bmiHeader.biSizeImage = w->length; int ww = StretchDIBits(dc, 0, 0, 32, 32, 0, 0, 32, 32, w->p, &bmi, DIB_RGB_COLORS, SRCCOPY); EndPaint( hwnd, &ps );
Maldini
![]() |
Other Threads in the C Forum
- Previous Thread: makes pointer from integer without a cast
- Next Thread: A simple query
Views: 2643 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for C
adobe ansi api array arrays bash binarysearch centimeter char convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory drawing dynamic executable fflush file fork frequency getlasterror givemetehcodez global graphics gtkgcurlcompiling hardware highest homework i/o inches infiniteloop initialization interest kilometer km lazy linked linkedlist linux linuxsegmentationfault list locate logical_drives match matrix meter microsoft motherboard multi mysql open opendocumentformat opensource owf pattern pdf performance pointer pointers posix power problem probleminc program programming pyramidusingturboccodes read recursion recv repetition scanf scheduling segmentationfault send shape socketprograming spoonfeeding stack standard strchr string strings structures student suggestions system systemcall test testautomation unix user voidmain() wab win32 win32api windows.h





