MobiNav

All Things Mobility

décembre 18th, 2007

Using Visual Styles with Owner-Drawn Controls

Source: msdn

This topic describes the use of the visual styles API to create custom controls or owner-drawn controls that take advantage of the visual styles available in Microsoft Windows XP and later versions of the operating system.

First your application should determine whether visual styles are available, by calling IsAppThemed. If visual styles are not available, use fallback code to draw the control.

If visual styles are available, you can use visual-styles functions such as DrawThemeText to render your control. Note that DrawThemeTextEx enables you to customize the appearance of text, retaining some properties of the theme font while modifying others.

To draw a control in the current visual style

  1. Call OpenThemeData, passing the hwnd of the control you want to apply visual styles to and a class list that describes the control’s type. The classes are defined in Vssym32.h. OpenThemeData returns an HTHEME handle, but if the visual styles manager is disabled or the current visual style does not supply specific information for a given control, the function returns NULL. If the return value is NULL, use non-visual-styles drawing functions.
  2. To draw the control background, call DrawThemeBackground or DrawThemeBackgroundEx.
  3. To determine the location of the content rectangle, call GetThemeBackgroundContentRect.
  4. To render text, use either DrawThemeText or DrawThemeTextEx, basing the coordinates on the rectangle returned by GetThemeBackgroundContentRect. These functions can render text either in the theme’s font for a specified control part and state, or in the font currently selected into the device context (DC).
  5. When your control receives a WM_DESTROY message, call CloseThemeData to release the theme handle that was returned when you called OpenThemeData.

Responding to Theme Changes
When your control receives a WM_THEMECHANGED message and is holding a global handle to the theme, it should do the following:

  • Call CloseThemeData to close the existing theme handle.
  • Call OpenThemeData to get the theme handle to the newly loaded visual style.
décembre 17th, 2007

Symbian market round-up(2007-Q3)

click here

décembre 17th, 2007

Linux and mobile

décembre 17th, 2007

Smartphone users want GPS capabilities

[source: GPS business news]

According to the 2007 Business Wireless Smartphone Customer Satisfaction Study released this week by JD Power and Associates, More than 40 percent of Smartphone business users in the United States would like GPS capabilities on their device.

The study also finds the following key Smartphone business wireless usage patterns: 26 percent would like Wi-Fi capabilities, 22 percent want touch screen and 19 percent would like to have a TV integrated into their device. Thirty-five percent of Smartphone owners download third-party software. Popular software downloads among business users include games (51%), travel-related programs (42%) and business applications such as Microsoft Word and Excel (36%).

The 2007 Business Wireless Smartphone Customer Satisfaction Study is based on responses from 1,089 business wireless customers who currently own a Smartphone device. Findings are based on data collected in August 2007.

décembre 11th, 2007

Portail de l’information géographique

Le portail information géographique de Wikipédia contient des liens vers de nombreux articles se rapportant à l’information géographique, les SIG, les bases de données, la programmation SIG, les techniques d’acquisition d’information géographique, les sources de données et bien d’autres encore.

|