GetDC manual page:
" For class and private DCs, GetDC leaves the previously assigned
" attributes unchanged.
This is not true (at least on W2k SP2 English) when the DC is
retrieved/set from different threads.
For example, one thread retrieves DC ('GetDC()') from window with
'CS_OWNDC' class style set and then set a font for this DC
('SelectObject()'). Then, different thread retrieves the DC ('GetDC()')
from the same window and outputs text ('TextOut()'). The text is
output using default font, not the font set by the first thread.
The values of DC handles retrieved by these two threads are different.
These two DC handle values are same if they are retrieved from the same
thread. The difference is probably due to the following info
from 'Remarks' section of 'GetDC' manual page:
" Note that the handle to the DC can only be used by a single thread
" at any one time.
but why should two different private DC handle values, that refer to the
same window, have different set of attributes (cited remark above) ?
Am I missing something or is this just an incorrect documentation or bug ?
Thanks for your thoughts.
Help stop world hunger -- visit <http://www.thehungersite.org>
Is The Hunger Site real? <http://www.umich.edu/~virus-busters/hunger.html>