gdi.c
来自「Visual C++网络通信编程实用案例精逊配套源码 光盘中存放的是书中涉及」· C语言 代码 · 共 45 行
C
45 行
#include "Gdi.h"
#include "Client.h"
#include <windows.h>
struct GdiList *Add_Gdi(struct GdiList *pNode,struct GdiDS Gdi)
{
if (pNode->pNext = (struct GdiList *)malloc(sizeof(struct GdiList)))
{
pNode = pNode->pNext;
pNode->Gdi.pDIBitmap = Gdi.pDIBitmap;
pNode->Gdi.pDIB = NULL;
pNode->Gdi.pStartDIB = NULL;
pNode->Gdi.iGridX = Gdi.iGridX;
pNode->Gdi.iGridY = Gdi.iGridY;
pNode->Gdi.iWidth1 = Gdi.iWidth1;
pNode->Gdi.iWidth2 = Gdi.iWidth2;
pNode->Gdi.iHeight1 = Gdi.iHeight1;
pNode->Gdi.iHeight2 = Gdi.iHeight2;
pNode->Gdi.lpBitmapIH = Gdi.lpBitmapIH;
pNode->Gdi.fDIBitmap = Gdi.fDIBitmap;
pNode->pNext = NULL;
return pNode;
}
return NULL;
}
void Clear_Gdi(struct GdiList *pStart)
{
struct GdiList *pPrev;
struct GdiList *pNode;
while (pNode = pStart->pNext)
{
pPrev = pStart;
pPrev->pNext = pNode->pNext;
if (pNode->Gdi.fDIBitmap)
{
free(pNode->Gdi.pDIBitmap);
free(pNode->Gdi.pDIB);
}
free(pNode);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?