Click here to Skip to main content
15,885,182 members
Articles / Desktop Programming / MFC

Static Control with ToolTip

Rate me:
Please Sign up or sign in to vote.
2.95/5 (10 votes)
13 Sep 2007CPOL 41.4K   2.1K   13  
The Tool Tip shows the Text of Static Control when the Text is clipped in Static Control.
// ToolTipCtrl.cpp : �A�v���P�[�V�����p�N���X�̒�`��s���܂��B
//

#include "stdafx.h"
#include "ToolTipCtrl.h"
#include "ToolTipCtrlDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CToolTipCtrlApp

BEGIN_MESSAGE_MAP(CToolTipCtrlApp, CWinApp)
	//{{AFX_MSG_MAP(CToolTipCtrlApp)
		// ���� - ClassWizard �͂��̈ʒu�Ƀ}�b�s���O�p�̃}�N����lj��܂��͍폜���܂��B
		//        ���̈ʒu�ɐ��������R�[�h��ҏW���Ȃ��ł��������B
	//}}AFX_MSG
	ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CToolTipCtrlApp �N���X�̍\�z

CToolTipCtrlApp::CToolTipCtrlApp()
{
	// TODO: ���̈ʒu�ɍ\�z�p�̃R�[�h��lj����Ă��������B
	// ������ InitInstance ���̏d�v�ȏ�������������ׂċL�q���Ă��������B
}

/////////////////////////////////////////////////////////////////////////////
// �B��� CToolTipCtrlApp �I�u�W�F�N�g

CToolTipCtrlApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CToolTipCtrlApp �N���X�̏�����

BOOL CToolTipCtrlApp::InitInstance()
{
	// �W���I�ȏ���������
	// ��������̋@�\��g�p�����A���s�t�@�C���̃T�C�Y�������������
	//  ��Έȉ��̓���̏��������[�`���̒�����s�K�v�Ȃ�̂�폜����
	//  ���������B

#ifdef _AFXDLL
	Enable3dControls();			// ���L DLL ��� MFC ��g���ꍇ�͂�����R�[�����Ă��������B
#else
	Enable3dControlsStatic();	// MFC �ƐÓI�Ƀ����N����ꍇ�͂�����R�[�����Ă��������B
#endif

	CToolTipCtrlDlg dlg;
	m_pMainWnd = &dlg;
	int nResponse = dlg.DoModal();
	if (nResponse == IDOK)
	{
		// TODO: �_�C�A���O�� <OK> �ŏ����ꂽ���̃R�[�h��
		//       �L�q�����������B
	}
	else if (nResponse == IDCANCEL)
	{
		// TODO: �_�C�A���O�� <��ݾ�> �ŏ����ꂽ���̃R�[�h��
		//       �L�q�����������B
	}

	// �_�C�A���O���‚����Ă���A�v���P�[�V�����̃��b�Z�[�W �|���v��J�n������́A
	// �A�v���P�[�V������I�����邽�߂� FALSE ��Ԃ��Ă��������B
	return FALSE;
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
India India
me a VC++ programmer

Comments and Discussions