1. RE: Printing Bitmaps <rewind>

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

new topic     » topic index » view message » categorize

2. RE: Printing Bitmaps <rewind>

Euman wrote:
> 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...
> 
  Look at the wingdi.h in include dir. your windows compiler
  borland, etc.
  TECHNOLOGY and the mask doesn't have any special OS requirement.

Bernie

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu