CreateCompatibleDC函数创建与指定设备兼容的内存设备上下文 (DC) 。 语法 C++复制 HDCCreateCompatibleDC( [in] HDC hdc ); 参数 [in] hdc 现有DC 的句柄。 如果此句柄为NULL,则该函数将创建与应用程序的当前屏幕兼容的内存 DC。 返回值 如果函数成功,则返回值是内存 DC 的句柄。
We use optional cookies to improve your experience on our websites, such as through social media connections, and to display personalized advertising based on your online activity. If you reject optional cookies, only cookies necessary to provide you the services will be used. You may change your...
The CreateCompatibleDC function can only be used with devices that support raster operations. An application can determine whether a device supports these operations by calling the GetDeviceCaps function.When you no longer need the memory device context, call the DeleteDC function to delete it....
if(hdc==NULL) return; // Create compatible HBITMAP hbCanvas=CreateCompatibleBitmap(hdcSkin,ScreenWidth,ScreenHeight); // Select HBITMAP into DC SelectObject(hdcCanvas,hbCanvas); 参考: 互动百科: CreateCompatibleDC MSDN: CreateCompatibleDC
See the CDC::BitBlt method for information regarding bit-block transfers between device contexts. To determine whether a device context supports raster operations, see the RC_BITBLT raster capability in the method CDC::GetDeviceCaps. Example コピー // This OnDraw() handler loads a bitmap ...
选择物理设备环境,则是彩色的。其实第一个链接就是对其中进行探讨,我觉得看到这边不明白可以直接看msdn:http://msdn.microsoft.com/en-us/library/windows/desktop/dd183488(v=vs.85).aspx里面很详细。 具体例子如下: 我们可以使用 HDC hDC = GetDC( NULL );...
两个CreateCompatibleDC (这叫兼容DC,以后就这么说)两个创建兼容DC的函数是不一样的,前者是API后者是DCD类的成员函数。,前者是直接创建一个当前DC的兼容DC然后返回这个创建的兼容DC。后者是先创建一个CDC,然后将这个DCD与当前DC兼容。还不懂?那当我没说 ...
作为参考,当您收到涉及Windows函数的链接错误时,只需搜索该函数并转到该函数的MSDN文档(我已经链接到这...
static WINGDIAPI HDC WINAPI CreateCompatibleDC_I( HDC hdcIn ); ParametershdcIn [in] Handle to an existing device context. If this handle is NULL, the method creates a memory device context compatible with the current screen for the application.Return...