CancelDC

  BOOL CancelDC(hdc)    
  HDC hdc;    

The CancelDC function cancels any pending operation on the specified DC.

Parameters

hdc

Identifies the device context.

Return Value

The return value is TRUE if the cancel bit was successfully set in the DC, otherwise it is FALSE.

Comments

CancelDC is used by a multithreaded application to cancel a long drawing operation in progress by one thread from another thread. The first thread will return an error. The result of the drawing operation is undefined.

If there is no drawing operation in progress the results are undefined.