1. Printing Bitmaps <rewind>
- Posted by Euman <euman at bellsouth.net> Jun 19, 2001
- 589 views
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 they have a single 1-bit somewhere. RC_STRETCHBLT = 2048 -- a power of two RASTERCAPS = 32 + 4 + 2 so it has 3 separate 1-bits and none correspond to 2048, so it doesn't make much sense to me. Maybe RASTERCAPS is not correct. Anyone with an idea? Euman euman at bellsouth.net
2. Re: Printing Bitmaps <rewind>
- Posted by Euman <euman at bellsouth.net> Jun 19, 2001
- 594 views
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 > they have a single 1-bit somewhere. > > RC_STRETCHBLT = 2048 -- a power of two > > RASTERCAPS = 32 + 4 + 2 > so it has 3 separate 1-bits and none correspond to 2048, > so it doesn't make much sense to me. > Maybe RASTERCAPS is not correct. > > Anyone with an idea? > > Euman > euman at bellsouth.net > > > > <snip>
3. Re: Printing Bitmaps <rewind>
- Posted by Euman <euman at bellsouth.net> Jun 19, 2001
- 589 views
I guess I could, I just chose this way. Because isnt TECHNOLOGY specific to Windows 98+? Im not sure it'll even work on Win 95... Anyone? > Why aren't you using TECHNOLOGY index with the value DT_RASPRINTER ? > > > Bernie