home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
vb_tools
/
vbxstd12
/
textdemo.cp_
/
TEXTDEMO.CPP
Wrap
C/C++ Source or Header
|
1994-08-23
|
2KB
|
75 lines
// textdemo.cpp : implementation file
//
#include "stdafx.h"
#include "vbxdemo.h"
#include "textdemo.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTextDemo dialog
CTextDemo::CTextDemo(CWnd* pParent /*=NULL*/)
: CDialog(CTextDemo::IDD, pParent)
{
//{{AFX_DATA_INIT(CTextDemo)
m_szMultiline = "";
//}}AFX_DATA_INIT
}
void CTextDemo::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTextDemo)
DDX_VBText(pDX, IDC_VBTEXT4, 20, m_szMultiline);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTextDemo, CDialog)
//{{AFX_MSG_MAP(CTextDemo)
ON_WM_DESTROY()
ON_BN_CLICKED(IDHELP, OnHelp)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTextDemo message handlers
void CTextDemo::OnDestroy()
{
CDialog::OnDestroy();
::WinHelp( m_hWnd, "VBXSTD12.HLP", HELP_QUIT, NULL );
}
BOOL CTextDemo::OnInitDialog()
{
CDialog::OnInitDialog();
m_szMultiline = "Of course it supports...\nmultiline texts!";
UpdateData( FALSE );
if ( !IsHlpHere() )
GetDlgItem( IDHELP )->EnableWindow( FALSE );
return TRUE; // return TRUE unless you set the focus to a control
}
void CTextDemo::OnHelp()
{
CString FAR szWinDir, szName, szMsg;
GetSystemDirectory( szWinDir.GetBuffer(250), 248 );
szWinDir.ReleaseBuffer();
if ( szWinDir.GetLength() > 3 )
szWinDir += "\\";
szName = szWinDir;
szName += "VBXSTD12.HLP";
if ( !IsHlpHere() )
return;
::WinHelp( m_hWnd, szName, HELP_KEY, (long)"VBText" );
}