Click to See Complete Forum and Search --> : Visual C++, Windows Operating System


May 24th, 1999, 07:55 AM
Windows operating system can have how many DC (device contexts)?

Jason Teagle
May 24th, 1999, 09:48 AM
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.

Sheik Mukthar
May 26th, 1999, 01:39 AM
5

Mukthar