VC implementation screen darker effect

zhaozj2021-02-16  46

There are many effects on the Internet to implement the screen dimming the screen (like the effect of closing Win95), I use VC to rewrite, rights belong to the original author!

Body HDC HDC; // Width of the Screen Int Scrwidth, Scrheight; if (M_Bool) {Byte Bybits [] = {0x55, 0x0, 0xAa, 0x0, 0x55, 0x0, 0xAa, 0x0, 0x55, 0x0, 0xAA, 0x0 , 0x55, 0x0, 0xaa, 0x0}; hbitmap = :: createbitmap (8, 8, 1, 1, bybits); hbrush = :: createpatternbrush (hbitmap); hdc = :: getdc (null); scrwidth = :: getSystemMetrics (SM_CXSCREEN); SCRHeight = :: GetSystemMetrics (SM_CYSCREEN); :: SelectObject (hdc, hBrush); // 0xA000C9 :: PatBlt (hdc, 0,0, SCRWidth, SCRHeight, 0xA000C9); :: DeleteObject (hBrush);: : ReleaseDC (0, HDC);} Else // Heavy Pictures :: InvalIdateERECT (NULL, 0, 1);

After the text, this article source code:

http://www.vchelp.net/asp/ibr_upload/656.rar

转载请注明原文地址:https://www.9cbs.com/read-27163.html

New Post(0)