Tip-Static control like 'Outlook Today's Tip' | CodeGuru

Tip-Static control like ‘Outlook Today’s Tip’

Environment: VC6 SP2, NT4 SP5, CE 2.11, Windows Y2K This Tip-Static control very smoothly show and hide Today’s tip. I think this control is so simple and useful. Just use it!! Usage Include TipStatic.cpp and TipStatic.h in your project. Create a new CTipStatic class object and just invoke Create function. In your header file. #include […]

Written By
CodeGuru Staff
CodeGuru Staff
Dec 15, 1999
1 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

Sample Image

Environment: VC6 SP2, NT4 SP5, CE 2.11, Windows Y2K

This Tip-Static control very smoothly show and hide Today’s tip.
I think this control is so simple and useful.
Just use it!!

Usage

  1. Include TipStatic.cpp and TipStatic.h in your project.
  2. Create a new CTipStatic class object and just invoke Create function.
    	In your header file.
    
    	#include "TipStatic.cpp"
    
    	class CMyDialog : public CDialog
    	{
    
    	....
    	// Attributes
    	protected:
    		CTipStatic m_ctrTipStatic;
    
    	};
    
    
    	In your cpp file.
    
    	int CMyDialog::OnCreate(LPCREATESTRUCT lpCreateStruct)
    	{
    		if (CDialog::OnCreate(lpCreateStruct) == -1)
    			return -1;
    
    		m_ctrTipStatic.Create("TipStatic",WS_VISIBLE|WS_CHILD,
    			CRect(10,10, 100,120),this, IDC_TIP_STATIC);
    
    		....
    
    		return 0;
    	}
    
  3. Initialize CTipStatic class object by using AddTip(), SetSliderColor(), SetSliderMode().
    	BOOL CStaticTipDlg::OnInitDialog()
    	{
    		CDialog::OnInitDialog();
    
    		....
    
    		// TODO: Add extra initialization here
    
    		// Add Tip..
    		m_ctrTipStatic.AddTip("Hi\n Welcome to Cool-Tip Static!!\n\nSmile Seo");
    		m_ctrTipStatic.AddTip("Second.. Tip");
    		m_ctrTipStatic.AddTip("Third.. Tip");
    
    		m_ctrTipStatic.SetSliderColor(GetSysColor(COLOR_3DFACE));
    		m_ctrTipStatic.SetSliderMode(TRUE);
    
    		....
    
    		return TRUE;  // return TRUE  unless you set the focus to a control
    	}
    
  4. Just call ShowNextTip() or ShowPrevTip().

Member Functions


	Function prototype
	Description


	void AddTip(CString strTip)
	Add tip-text to the CTipStatic


	void SetSliderColor(COLORREF colSlider)
	If you use 'Slider', this 'colSlider' is wonderful effect just like 'Outlook today's tip'.


	void SetSliderMode(BOOL bSlider)
	Use 'slider' mode on not


Ajou University C.C. 4th member.

Downloads

Download demo project – 124 Kb
Download source – 2 Kb

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.