Click here to Skip to main content
15,886,110 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.
========================================================================
       MICROSOFT FOUNDATION CLASS ���C�u���� : ToolTipCtrl
========================================================================


AppWizard ���������� ToolTipCtrl �ɂ́AMicrosoft Foundation Class �̊�{�I��
�g������������Ă��܂��B�A�v���P�[�V�����쐬�̂ЂȌ^�Ƃ��Ă��g�����������B

���̃t�@�C���ɂ� ToolTipCtrl ��\�����Ă���e�t�@�C���̊T�v������܂܂�Ă��܂��B

ToolTipCtrl.dsp
    ���̃t�@�C�� (�v���W�F�N�g �t�@�C��) �̓v���W�F�N�g ���x���̏���܂݁A
    �V���O�� �v���W�F�N�g�܂��̓T�u �v���W�F�N�g�̃r���h�Ɏg�p����܂��B����
    ���[�U�[�ƃv���W�F�N�g �t�@�C�� (.dsp) ����L�ł��܂����A���C�N �t�@�C��
    �̓��[�J���ɃG�N�X�|�[�g���Ă��������B

ToolTipCtrl.h
    ���̃t�@�C���̓A�v���P�[�V�����̒��S�ƂȂ�C���N���[�h�t�@�C���ł��B����
    �t�@�C���͑��̃v���W�F�N�g�̌ŗL�̃C���N���[�h�t�@�C���iResource.h  ���
    �݂܂��j ��C���N���[�h���A�܂� CToolTipCtrlApp �A�v���P�[�V�����N���X���
    �����܂��B

ToolTipCtrl.cpp
    ���̃t�@�C���� CToolTipCtrlApp �A�v���P�[�V�����N���X��܂ރA�v���P�[�V����
    �̒��S�ƂȂ�\�[�X�t�@�C���ł��B

ToolTipCtrl.rc
    ���̃t�@�C���̓v���O�������g�p���� Microsoft Windows �̃��\�[�X��񋓂���
    ���B���̃t�@�C���� RES �T�u�f�B���N�g���ɕۑ�����Ă���A�C�R���A�r�b�g�}
    �b�v�A�J�[�\����܂݂܂��B���̃t�@�C���� Microsoft Visual C++ �Œ���
    �ҏW�”\�ł��B

ToolTipCtrl.clw
    ���̃t�@�C���� ClassWizard  �������̃N���X�̕ҏW��N���X��V�K�쐬�����
    ���Ɏg����������Ă��܂��B�܂����̃t�@�C���́AClassWizard �ɂ�郁�b�Z
    �[�W �}�b�v��_�C�A���O �f�[�^ �}�b�v�̕ҏW�␶���A�v���g�^�C�v �����o��
    ���̐����ɕK�v�ȏ�������Ă��܂��B

res\ToolTipCtrl.ico
    ���̃t�@�C���́A�A�v���P�[�V�����̃A�C�R���Ƃ��Ďg�p�����A�C�R���t�@�C
    ���ł��B���̃A�C�R���̓��\�[�X �t�@�C�� ToolTipCtrl.rc �ɂ���ăC���N���[�h
    ����܂��B

res\ToolTipCtrl.rc2
    ���̃t�@�C���� Microsoft Visual C++ �ɂ���ĕҏW����Ȃ����\�[�X��܂�ł���
    ���B���̃t�@�C���Ƀ��\�[�X �G�f�B�^�ŕҏW����Ȃ����ׂẴ��\�[�X��L�q
    �����������B




/////////////////////////////////////////////////////////////////////////////

AppWizard �� 1 �‚̃_�C�A���O �N���X��쐬���܂�:

ToolTipCtrlDlg.h, ToolTipCtrlDlg.cpp - �_�C�A���O
    �����̃t�@�C���� CToolTipCtrlDlg �N���X��܂݂܂��B���̃N���X�� 
    �A�v���P�[�V�����̃��C�� �_�C�A���O�̓�����`���܂��B�_�C�A���O
    �e���v���[�g�� Microsoft Visual C++ �ŕҏW�”\�� ToolTipCtrl.rc �Ɋ�
    �܂�܂��B


/////////////////////////////////////////////////////////////////////////////
���̑��̕W���t�@�C��:

StdAfx.h, StdAfx.cpp
    �����̃t�@�C���̓v���R���p�C���σw�b�_�[ �t�@�C�� (PCH) ToolTipCtrl.pch 
    ��v���R���p�C���ό^�t�@�C�� StdAfx.obj ��\�z���邽�߂Ɏg����t�@�C���ł��B

Resource.h
    ���̃t�@�C���͐V�K���\�[�X ID ���`����W���w�b�_�[ �t�@�C���ł��B
    Microsoft Visual C++ �͂��̃t�@�C����ǂݍ��ݍX�V���܂��B

/////////////////////////////////////////////////////////////////////////////
���̑��̒���:

"TODO:" �Ŏn�܂�R�����g�́A�\�[�X�R�[�h�̒lj���J�X�^�}�C�Y�̕K�v�ȏꏊ���
���܂��B

�A�v���P�[�V�����ŋ��L DLL ��� MFC ��g�p����ꍇ��A�A�v���P�[�V������
�I�y���[�e�B���O �V�X�e���Ō��ݎg�p���Ă��錾��ȊO�̌����g�p���Ă���ꍇ�́A
Microsoft Visual C++ CD-ROM ����A���[�J���C�Y���ꂽ���\�[�X�ɑΉ�����
MFC42XXX.DLL �� system �܂��� system32 �f�B���N�g���ɃR�s�[���āA�t�@�C������ 
MFC42LOC.DLL �ɂ���K�v������܂��B("XXX" �͌���̏ȗ��`������܂��B�Ⴆ�΁A
MFC42JPN.DLL �͓��{��ɖ|�󂳂ꂽ���\�[�X��܂݂܂��B)
���̂悤�ɂ��Ȃ������ꍇ�ɂ́A�A�v���P�[�V������̂����‚��� UI �v�f�̓I�y
���[�e�B���O �V�X�e���̌���̂܂܎c��܂��B

/////////////////////////////////////////////////////////////////////////////

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