First, the use of Reshacker will be NTOSKRNL. EXE in the resources HACK out, after installing Reshacker, find the system directory NTOSKRNL. EXE, and then open the file, bitmap resources to find the Windows boot screen we need, and then use to save resources into a BMP way to export resources to a BMP file, through simple processing can be static color belt BMP file Dynaline.bmp! ::
Figure one use Reshacker get boot screen
Second, program design
Next we need to create a simple dialog box project in VC demoline
Import the static bitmap dynaline.bmp we obtained and add a bitmap resource to the project Idb_dynline
In the dialog box, add a static picture control, set the CStatic property to bitmap,
Then create an MFC new class cdynline that derives from CStatic, and we let this class to complete the animation display!
Add a worker thread to the implementation code of the class Cdynline, which is responsible for displaying the static screen as a dynamic ribbon strip with the following code:
UINT DispThread(LPVOID lpParam)
{
CDynLine* pWnd = (CDynLine*)lpParam;
CClientDC dcClient(pWnd);
CDC dcMem;
dcMem.CreateCompatibleDC(&dcClient);
BITMAP bits;
pWnd->m_bmp.GetBitmap(&bits);
CBitmap *pBmp = (CBitmap*)dcMem.SelectObject( pWnd->m_bmp );
CSize size(0,0);
while(g_lDisplay)
{
if( size.cx < bits.bmWidth )
size.cx +=2;
else
size.cx = 0;
dcClient.BitBlt( 0,0,size.cx,bits.bmHeight,&dcMem,(bits.bmWidth-size.cx),0,SRCCOPY);
dcClient.BitBlt( size.cx,0,(bits.bmWidth-size.cx),bits.bmHeight,&dcMem,0,0,SRCCOPY);
Sleep( 20 );
}
return 1;
}
The dynamic display of the algorithm is very simple, that is, constantly moving the location of the fill image.