虚屏 (Win98关机时的网格,但不能锁定)

void __fastcall TForm1::Button1Click(TObject *Sender)
{
    unsigned short ary[8]={0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA};
    HBITMAP hbm=CreateBitmap(8,8,1,1,ary);
    HBRUSH hbs=CreatePatternBrush(hbm);
    HDC hdc=GetDC(NULL);
    SelectObject(hdc,hbs);
    PatBlt(hdc,0,0,Screen->Width,Screen->Height,0xA000C9);
    DeleteObject(hbs);
    DeleteObject(hbm);
    ReleaseDC(NULL,hdc);
}

//恢復
InvalidateRect(NULL,NULL,TRUE);

你可能感兴趣的:(虚屏 (Win98关机时的网格,但不能锁定))