Windows operating system can have how many DC (device contexts)?
Printable View
Windows operating system can have how many DC (device contexts)?
If I remember correctly, memory DCs are only limited by memory; for DCs which represent a window (from GetDC() ), you can only have 5 at any one time. In 16-bit Windows I believe subsequent attempts to get one would fail; I think in 32-bit Windows it now dumps one of the earlier DCs, which might cause undesirable side-effects in other programs.
Rule-of-thumb: Don't grab more than one at a time, and release it as soon as possible!
If you want to perform the same series of drawing commands on several DCs, consider creating and playing a Windows metafile.
5
Mukthar