[comp.windows.ms.programmer] SetDIBitsToDevice

wilcox@wucs1.wustl.edu (Don Wilcox) (04/09/91)

I have yet another question.  BTW, I have to program on both the Mac and in
Windows, and it is my personal experience that this newsgroup is much more
"professional" than the Mac.programmer group.  It's probably that we ware still
a small, personal newsgroup.

Anyways,  to me question.  I have a large array of unsigned bytes that I wish
to display on my SVGA monitor as an image.  To do this, I am using the barely
documented SetDIBitsToDevice() call.  Now for the hard part.  The window into 
which I am drawing the image is smaller than the image, so I have provided 
scroll bars.  If the user scrolls the image horizontally, no problem.  However,
when I scroll vertically, only part of the image if displayed.  That is, the
image is scrolled up, but only the portion which originally extended to the
bottom is displayed.  No extra image is drawn.  What I would like to know is, 
has anyone used SetDIBitsToDevice?  If so, have you used to to display a 
sub-rectangle from the DIB?  I have tried everything I can think of.  BTW,  I 
am taking the bizarre origin (i.e. bottom-left) of DIBs into account.

As happens frequently, I spent all last evening trying to find an answer to
this using TD, and never got close.  Any pointers would be greatly appreciated.

Thanks,

Don
sig files are too expensive for a grad student's budget.