Simulate Windows boot dynamic ribbon bar

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.