dc

Associating System.Drawing.Graphics with a device context?

Is there a way of attaching a System.Drawing.Graphics class to a device context (HDC) for another window which was retrieved via GetDC API function? It is easier than using GDI+ directly. ...

Saving an image of what a dc drew, wxPython.

I need to be able to save an image (format doesn't matter) of the state of the dc canvas. I tried dc.GetAsBitmap but it returns invalid bitmaps. How can I do it? ...

set MFC DC to Qprinter

Hi - I was just wondering is that possible to use my existing MFC creadted DC to associate with QPrinter so that it directly uses this existing DC rather creates its own with QPrintDialog?? Does Qprinter also does backing store as Qwidget does?I mean does this creates an offscreen image before printing? Regards, Harris ...

how do I convert fractional decimal numbers to fractional binary numbers using dc

So dc is a great tool for converting between bases - handy for those bit twiddling coding jobs. e.g to convert 1078 into binary I can do this: bash> echo "2o1078p" | dc 10000110110 However I can't get it to print fractions between 0 and 1 correctly. Trying to convert 0.3 into binary: bash> echo "2o10k 0.3p" | dc .0100 But 0.0100(bi...