Examining a Device Contexts Current Pixel Format
Use the GetPixelFormat and DescribePixelFormat functions to examine a device context's current pixel format, as shown in the following code fragment.
PIXELFORMATDESCRIPTOR pfd;
HDC hdc;
int iPixelFormat;
// if the device context has a current pixel format ...
if (iPixelFormat = GetPixelFormat(hdc)) {
// obtain a detailed description of that pixel format
DescribePixelFormat(hdc, iPixelFormat,
sizeof(PIXELFORMATDESCRIPTOR), &pfd);
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for