MobiNav

All Things Mobility

juin 30th, 2010

Visual Studio: memory leak detection

A useful preprocessor _CRTDBG_MAP_ALLOC which gives more information about the memory leak. (more>>)

avril 21st, 2009

CPPToolTip v2.1

A class that allows you to display your data for a control as tooltip. written by Eugene Pustovoyt and published in Codeproject.  Very cool.

Features

  • Standard and balloon tooltip
  • Built-in HTML-lite language for a tooltip
  • Built-in support for CSS styles
  • Built-in support for menus and toolbars
  • Support for any size icons (max. 256 colors)
  • Support for bitmaps
  • Support for ImageList
  • Load icons, bitmaps and strings from resources, DLLs or files
  • Support Fade-in and Fade-out effects
  • Support for gradient shadow for tooltip and images
  • Support for applies miscellaneous effects over the any images (lighten, darken, grayed)
  • Support for hyperlinks
  • Support for hot areas
  • Support for tables
  • Support for CScrollView
  • Extended <br> and <t> tags
  • Extended resource strings for the menu and toolbars items
  • Every size can be customized
  • Change runtime a tooltip’s text
  • Implemented a Debug Mode (an idea from www.tooltips.net site with Vitaly Tomilov‘s permission)
  • Support for an animation – NEW in v2.1
  • Support a text wrapping – NEW in v2.1
  • Full source code included!
janvier 7th, 2009

How to get Google Map Image by Google API

An example can be found in Perry Bruins’ article « Track your position using a Windows Mobile 6 device« .

décembre 23rd, 2008

An Anti_Reverse Engineering Guide

A great article in CodeProject by Hosh Jackson who gave a look at into the area of preventing reserse engineering.

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.
mars 9th, 2007

Wave Class for Playing and Recording Wave Files

look here

février 28th, 2007

Animated Dialog windows

This is a very good article that gives a way for cool user friendly look GUI. Much imagination with simple implementation.

février 20th, 2007

CButtonST

介绍
VC界面设计中,按钮占有很大的份额.如果设计漂亮专业友好的按钮是每个程序员必须要掌握的基本功.然而VC本身提供的按钮样式有限,且制作不便.现在使用这个免费的按钮CButtonST类来制作平面/非平面带有图标的按钮,非常的简洁和实用.本类可以创建平面带有图标,文字的按钮.在原来的基础上笔者加入了WinXP样式的圆角按钮,增加ToolTip冒泡提示文字,增加打开URL的功能. [Here]

|