SECTipOfDay Class

class SECTipOfDay: public CDialog

The SECTipOfDay class provides a customizable tip of the day dialog similar to those found in Microsoft Word and Windows 95. Tip (.tip) files are plain ASCII files that can be easily created and modified by the end user. Customizations include: changing the icon, tip font, dialog title, lead-in text, and total button manipulation. SECTipOfDay has a ‘show at startup’ check box and other state information such as the current tip which the user must store in the profile/registry.

Defined in: SECTOD.H

Comments

The TODTEST sample in the \SAMPLES\TOOLKIT\STANDARD\UIEXT\TODTEST directory demonstrates how to create both modal and modeless tip of the day dialogs, and how to store/restore state information from the profile. Also, full customization is demonstrated.

Class Members

Public Members

SECTipOfDay(const TCHAR * lpszTipFileName, int nTip = 1, BOOL bShowAtStart = 1, CWnd* pParent = NULL)

The SECTipOfDay constructor creates the SECTipOfDay object.

virtual BOOL  Create()

This function creates a modeless tip of the day dialog.

int  GetCurrentTip()

Returns the tip index for the current tip.

LPCTSTR  GetCurrentFileName()

Returns the name of the current tip file.

BOOL  GetShowAtStartup()

Gets the setting of the internal state which controls if the show at startup check box

void  SetCurrentTip(int nNewTip)

Sets the current tip number.

void  SetTipIcon(UINT nNewIconID)

Can be called to customize the tip icon. Default is Word-like light bulb.

void  SetLeadInText(const TCHAR * lpNewLeadInText)

Called to customize the lead-in text.

void  SetLeadInFont(CFont * pNewLeadInFont)

Called to customize the lead-in text font.

void  SetTipFont(CFont * pNewTipFont)

Sets the font for the tip text.

virtual void  OnHelp()

Override to hook in your on-line help.

virtual int  OnInitDialog()

Override to change or add initialization.