CCeStaticST v1.1

A nice and interactive static control for your Windows Mobile applications

No.
This class is not included in the latest SoftechSoftware DLL version.

Description

CCeStaticST is a class derived from MFC CStatic class.

Using this class developers will have the option to drastically improve the look and feel of their Windows Mobile based applications !

CCeStaticST has been designed and developed for the following enviroments:

Downloadable package contains binaries for the following platforms:
Main CCeStaticST features are:

How to integrate CCeStaticST in your application

In your project include the following files:

Create a CCeStaticST object statically
With dialog editor create a standard static control called, for example, IDC_STCTEST (you don't need to make it owner drawn) and create a member variable for this control:
CCeStaticST m_stcTest;
Now attach the control to CCeStaticST. For dialog-based applications, in your OnInitDialog:
// Call the base-class method
CDialog::OnInitDialog();

// Create the IDC_STCTEST control
m_stcTest.SubclassDlgItem(IDC_STCTEST, this);
Or in your DoDataExchange:
// Call the base method
CDialog::DoDataExchange(pDX);

// Create the IDC_STCTEST control
DDX_Control(pDX, IDC_STCTEST, m_stcTest);

Class methods

SetIcon (using multi-size resources)
Assigns icon to the control.
Any previous icon will be removed.

// Parameters:
//     [IN]   nIcon
//            ID number of the icon resource to show on the control.
//            Pass NULL to remove any icon from the control.
//     [IN]   nCxDesired
//            Specifies the width, in pixels, of the icon to load.
//     [IN]   nCyDesired
//            Specifies the height, in pixels, of the icon to load.
//     [IN]   bRepaint
//            If TRUE the control will be immediately repainted.
//     [IN]   hInstance
//            Handle of the instance that contains the icon.
//            If NULL the icon will be loaded from the .EXE resources
//
// Return value:
//      CESTATICST_OK
//          Function executed successfully.
//      CESTATICST_INVALIDRESOURCE
//          Failed loading the specified resource.
//
DWORD SetIcon(int nIcon, int nCxDesired = 32, int nCyDesired = 32, BOOL bRepaint = TRUE, HINSTANCE hInstance = NULL)
SetIcon (using handles)
Assigns icon to the control.
Any previous icon will be removed.
// Parameters:
//     [IN]   hIcon
//            Handle fo the icon to show on the control.
//            Pass NULL to remove any icon from the control.
//     [IN]   nCxDesired
//            Specifies the width, in pixels, of the icon to load.
//     [IN]   nCyDesired
//            Specifies the height, in pixels, of the icon to load.
//     [IN]   bRepaint
//            If TRUE the control will be immediately repainted.
//
// Return value:
//      CESTATICST_OK
//          Function executed successfully.
//      CESTATICST_INVALIDRESOURCE
//          Failed loading the specified resource.
//
DWORD SetIcon(HICON hIcon, int nCxDesired = 32, int nCyDesired = 32, BOOL bRepaint = TRUE)
SetColors
Sets foreground and background colors of the control.
// Parameters:
//     [IN]   crTextColor
//            A COLORREF value indicating the foreground color.
//     [IN]   crBkColor
//            A COLORREF value indicating the background color.
//     [IN]   bRepaint
//            If TRUE the control will be immediately repainted.
//
void SetColors(COLORREF crTextColor, COLORREF crBkColor, BOOL bRepaint = TRUE)
SetTextColor
Sets foreground color of the control.
// Parameters:
//     [IN]   crTextColor
//            A COLORREF value indicating the foreground color.
//     [IN]   bRepaint
//            If TRUE the control will be immediately repainted.
//
void SetTextColor(COLORREF crTextColor, BOOL bRepaint = TRUE)
SetBkColor
Sets background color of the control.
// Parameters:
//     [IN]   crBkColor
//            A COLORREF value indicating the background color.
//     [IN]   bRepaint
//            If TRUE the control will be immediately repainted.
//
void SetBkColor(COLORREF crBkColor, BOOL bRepaint = TRUE)
SetBold
Sets bold effect for control's text.
// Parameters:
//     [IN]   bBold
//            If TRUE the control's text will have a bold effect.
//     [IN]   bRepaint
//            If TRUE the control will be immediately repainted.
//
void SetBold(BOOL bBold, BOOL bRepaint = TRUE)
SetItalic
Sets italic effect for control's text.
// Parameters:
//     [IN]   bItalic
//            If TRUE the control's text will have an italic effect.
//     [IN]   bRepaint
//            If TRUE the control will be immediately repainted.
//
void SetItalic(BOOL bItalic, BOOL bRepaint = TRUE)
SetUnderline
Sets underline effect for control's text.
// Parameters:
//     [IN]   bUnderline
//            If TRUE the control's text will have an underline effect.
//     [IN]   bRepaint
//            If TRUE the control will be immediately repainted.
//
void SetUnderline(BOOL bUnderline, BOOL bRepaint = TRUE)
SetMessageClick
Assigns a message that will be sent to a window when the user taps on the control.
// Parameters:
//     [IN]   byClickType
//            Type of the click for which assign the message.
//            This is a zero-based value and can be one of the following:
//            CESTATICST_CLICK         A single click on the control
//            CESTATICST_DBLCLICK      A double click on the control
//     [IN]   hWnd
//            Handle of the window that will be receive the message.
//            Set this value to NULL to disable the message for a particular click.
//     [IN]   nMsg
//            Message to sent.
//     [IN]   wParam
//            Application defined WPARAM value.
//     [IN]   lParam
//            Application defined LPARAM value.
//
// Return value:
//     CESTATICST_OK
//            Function executed successfully.
//     CESTATICST_INVALIDCLICKTYPE
//            Invalid click type.
//
DWORD SetMessageClick(BYTE byClickType, HWND hWnd, UINT nMsg, WPARAM wParam = 0, LPARAM lParam = 0)
DrawTransparent
Enables the transparent mode.
Note: this operation is not reversible.
DrawTransparent should be called just after the control is created.
Do not use trasparent static controls until you really need it (you have a bitmapped
background) since each transparent control makes a copy in memory of its background.
This may bring unnecessary memory use and execution overload.
// Parameters:
//     [IN]   bRepaint
//            If TRUE the control will be immediately repainted.
//
// Return value:
//      CESTATICST_OK
//          Function executed successfully.
//
DWORD DrawTransparent(BOOL bRepaint = FALSE)
GetVersionI
Returns the class version as a short value.
// Return value:
//     Class version. Divide by 10 to get actual version.
//
static short GetVersionI()
GetVersionC
Returns the class version as a string value.
// Return value:
//     Pointer to a null-terminated string containig the class version.
//
static LPCTSTR GetVersionC()

History

Disclaimer and usage terms

The software and the accompanying files are distributed "AS IS" and without any warranties whether expressed or implied. No responsibilities for possible damages or even functionality can be taken. The user must assume the entire risk of using this software.
The sample application and the source codes (where available) are for demostration purposes only. You are not allowed to use the demo source codes, libraries and DLLs in any of your application. If you like this software you must buy the full version.
Downloading anything from this site means you accept the above terms.