MCPcopy Create free account
hub / github.com/DentonW/DevIL / CreateGDI

Function CreateGDI

DevIL/examples/windows_example/WindowsTest.cpp:187–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185
186
187void CreateGDI()
188{
189 ILuint CopyName, CurName, CurImg, CurMip;
190
191 hDC = GetDC(HWnd);
192 hMemDC = CreateCompatibleDC(hDC);
193 CurName = ilGetInteger(IL_CUR_IMAGE);
194 CurImg = ilGetInteger(IL_ACTIVE_IMAGE);
195 CurMip = ilGetInteger(IL_ACTIVE_MIPMAP);
196 CopyName = ilCloneCurImage();
197 ilBindImage(CopyName);
198 //ilConvertImage(IL_BGR, IL_UNSIGNED_BYTE);
199 hBitmap = ilutConvertToHBitmap(hDC);
200 ilutGetBmpInfo((BITMAPINFO*)&BmpInfo);
201 DeleteObject(SelectObject(hMemDC, hBitmap));
202 ilBindImage(CurName);
203 if (CurImg)
204 ilActiveImage(CurImg);//ilBindImage(Undos[0]);
205 if (CurMip)
206 ilActiveMipmap(CurMip);
207 ilDeleteImages(1, &CopyName);
208
209 return;
210}
211
212
213void DestroyGDI()

Callers 1

WndProcFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected