This is a mirror of official site: http://jasper-net.blogspot.com/

A Shallow Dive into the Hilo Browser

| Sunday, June 6, 2010
In this blog post, I’m going to take a look into the overall design of the first Hilo application, the Hilo Browser, and will take a shallow dive into the integration of Windows features. The following sections will be covered:
·         Overall Application Design

·         Shell Integration

·         Direct 2D Integration

·         Windows Animation Integration

In future articles, I will take a closer look at the various feature areas of Hilo. For an overview on what the application does, read the first Hilo article on MSDN that describes the application. You can download the source from the Hilo Code Project page.
Overall Design
The Hilo project solution consists of two projects: Browser – the actual application and Common – utility classes that will be shared with future solutions and that simplify various components specific to the Hilo Browser.
The Browser project contains the application entry point in the Browser.cpp source file.  This  entry point initializes the browser application and message loop as seen in the following code segment.


int APIENTRY _tWinMain(
   HINSTANCE /*hInstance*/,
   HINSTANCE /*hPrevInstance*/,
   LPTSTR    /*lpCmdLine*/,
   int       /*nCmdShow*/)
{
   ComPtr<IWindowApplication> mainApp;

   // Create and initialize the main application object
   HRESULT hr = SharedObject<BrowserApplication>::Create(&mainApp);

   if (SUCCEEDED(hr))
   {
       // Start the message loop for the application
       hr = mainApp->RunMessageLoop();
   }

   return 0;
}


Calling the Create method on the BrowserApplication object causes that object to be initialized via its Initialize method.  That method sets up all the child objects and their associated IWindow interfaces. During initialization, the components of the Hilo browser are initialized using the InitializeCarouselPane and InitializeMediaPane methods and are added as children of the application’s parent window.
Within the initialization methods, the MediaPane and CarouselPane objects are constructed and these objects encapsulate the various features used by the application.

Shell Integration Features

Shell integration features of Windows are used throughout various parts of the application.  The first noticeable place that shell integration is used is in the application initialization when the Photos library is used as the starting point for the browser and the Computer known folder is used as a fallback library.

Read more: See Also
Read more: MSDN
Read more: Hilo Code Project page

Posted via email from jasper22's posterous

0 comments: