Home > Software engineering >  GetDC equipment dc will not update
GetDC equipment dc will not update

Time:11-14

Operating system Windows 10
Find window through FindWindow pointer
And then use the: : GetDC CDC pointer
Call the CDC GetPixel access window one color of the pixel coordinates of the following would happen
1. Return RGB, 255, 255, 255 this is wrong value
2. Return RGB 0 0 0 is wrong value
3. Return to RGB aa, bb, cc is right but the value of the window to replace other pictures, to the value of the still is aa, bb, cc will not update

This program can be normal use on Windows 7
Why can't a failure on the Windows 10 normal take color
The CDC has released after use,

CodePudding user response:

Before each GetPixel GetDC?

CodePudding user response:

The question now is
GetDC then GetPixel ReleaseDC immediately
Application starts the first call to properly read the window of the pixel color values
Window image change, and then call or the value of the last feeling DC does not change the content of the real-time updates
Restart Windows for the first time is right, then call values are not updated,
Whether to call updateDC method or something similar?
This problem does not appear only on win10 system under Windows 7 have

CodePudding user response:

Window CS_OWNDC?

CodePudding user response:

You should FindWindow again
  • Related