RE: Printing Bitmaps <rewind>
- Posted by Bernie Ryan <xotron at localnet.com> Jun 19, 2001
- 379 views
Euman wrote: > I guess it doesnt make much difference to do this. > > if length(getPrinter()) > 0 then > > result = w32Func(xGetDeviceCaps, { getDC(Printer), RASTERCAPS } ) > > if and_bits(RC_STRETCHBLT, result) then > else puts(2,"Cant print Grachic") > end if > > > Euman > euman at bellsouth.net > > > > Hello all, > > > > GetDeviceCaps question and why testing to see if > > a printer is capable of printing raster graphics. > > > > below is a list of the constants associated with > > Raster in Windows: > > > > constant > > RASTERCAPS = 38, > > RC_BANDING = 2, > > RC_BITBLT = 1, > > RC_BITMAP64 = 8, > > RC_DI_BITMAP = 128, > > RC_DIBTODEV = 512, > > RC_FLOODFILL = 4096, > > RC_GDI20_OUTPUT = 16, > > RC_PALETTE = 256, > > RC_SCALING = 4, > > RC_STRETCHBLT = 2048, > > RC_STRETCHDIB = 8192, > > RC_DEVBITS = #8000, > > RC_OP_DX_OUTPUT = #4000, > > > > retval = c_func(GetDeviceCaps,{prntHDC, RASTERCAPS}) > > > > here it is in C > > > > if ( ! (GetDeviceCaps(printdlg.hDC, RASTERCAPS) > > & RC_STRETCHBLT)) > > { > > MessageBox(hwnd, "Cant Print Raster Image", > > "Error", MB_OK); > > return; > > } > > > > retval is a single integer, how do I distinguish > > whether or not a particular function is possible > > from that retval? > > > > Here is the Catch: > > > > RASTERCAPS = 38, <--- Not a power of 2 > > > > All the other constants are powers of 2, so in binary <snip> Why aren't you using TECHNOLOGY index with the value DT_RASPRINTER ? Bernie