本文整理汇总了C++中PSD::FreeMemGC方法的典型用法代码示例。如果您正苦于以下问题:C++ PSD::FreeMemGC方法的具体用法?C++ PSD::FreeMemGC怎么用?C++ PSD::FreeMemGC使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PSD
的用法示例。
在下文中一共展示了PSD::FreeMemGC方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
/* Destroy a pixmap*/
void
GsDestroyPixmap(GR_PIXMAP *pp)
{
GR_PIXMAP *prevpp;
PSD psd = pp->psd;
/* deallocate mem gc*/
psd->FreeMemGC(psd);
/*
* Remove this pixmap from the complete list of pixmaps.
*/
prevpp = listpp;
if (prevpp == pp)
listpp = pp->next;
else {
while (prevpp->next != pp)
prevpp = prevpp->next;
prevpp->next = pp->next;
}
/*
* Forget various information if they related to this
* pixmap. Then finally free the structure.
*/
if (pp == cachepp) {
cachepixmapid = 0;
cachepp = NULL;
}
free(pp);
}
示例2: GetDCEx
/* return NULL if no driver bitblit available*/
HDC WINAPI
CreateCompatibleDC(HDC hdc)
{
HDC hdcmem;
PSD psd;
PSD mempsd;
/* allow NULL hdc to mean screen*/
psd = hdc? hdc->psd: &scrdev;
/* allocate memory device, if driver doesn't blit will fail*/
mempsd = psd->AllocateMemGC(psd);
if(!mempsd)
return NULL;
/* allocate a DC for DesktopWindow*/
hdcmem = GetDCEx(NULL, NULL, DCX_DEFAULTCLIP);
if(!hdcmem) {
mempsd->FreeMemGC(mempsd);
return NULL;
}
hdcmem->psd = mempsd;
/* select in default bitmap to setup mem device parms*/
SelectObject(hdcmem, (HGDIOBJ)&default_bitmap);
return hdcmem;
}