⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userinputdlg.cpp

📁 VIS H.323 Library V2.1 Release
💻 CPP
字号:
/*
  VIS H.323 Video Conference System
      --Sample for VIS H.323 DLL Library 2.1 Release

  For more information,visit our homepage 
  
    [http://www.115studio.com]

  or mail to us for tech support and bug report

    [support@115studio.com]

  2000-2004 115Studio
  
  2004-04-05
*/
// UserInputDlg.cpp : implementation file
//

#include "stdafx.h"
#include "VISConf.h"
#include "UserInputDlg.h"
#include "config.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CUserInputDlg dialog


CUserInputDlg::CUserInputDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CUserInputDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CUserInputDlg)
	m_bAutoPop = FALSE;
	//}}AFX_DATA_INIT
	m_brush.CreateSolidBrush(0x00ffffff);
}
CUserInputDlg::~CUserInputDlg()
{

}

void CUserInputDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CUserInputDlg)
	DDX_Control(pDX, IDC_INPUT, m_edtInput);
	DDX_Check(pDX, IDC_AUTO_POP_UP, m_bAutoPop);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CUserInputDlg, CDialog)
	//{{AFX_MSG_MAP(CUserInputDlg)
	ON_WM_CTLCOLOR()
	ON_WM_SIZE()
	ON_WM_CLOSE()
	ON_BN_CLICKED(IDC_AUTO_POP_UP, OnAutoPopUp)
	ON_WM_DESTROY()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CUserInputDlg message handlers

HBRUSH CUserInputDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) 
{
	HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
	
	// TODO: Change any attributes of the DC here
	if(pWnd->m_hWnd==m_edtInput)
	{
		pDC->SetBkColor(0x00ffffff);
		return m_brush;
	}
	// TODO: Return a different brush if the default is not desired
	return hbr;
}

void CUserInputDlg::OnSize(UINT nType, int cx, int cy) 
{
	CDialog::OnSize(nType, cx, cy);
	
	// TODO: Add your message handler code here
	CRect rc;
	m_edtInput.GetWindowRect(&rc);
	ScreenToClient(&rc);
	rc.right=cx-1;
	rc.bottom=cy-1;
	m_edtInput.SetWindowPos(NULL,0,0,rc.Width(),rc.Height(),SWP_NOMOVE);
}

BOOL CUserInputDlg::OnCommand(WPARAM wParam, LPARAM lParam) 
{
	// TODO: Add your specialized code here and/or call the base class
	if(LOWORD(wParam)==IDOK||LOWORD(wParam)==IDCANCEL)
		return TRUE;
	return CDialog::OnCommand(wParam, lParam);
}

void CUserInputDlg::OnClose() 
{
	// TODO: Add your message handler code here and/or call default
	CWnd *MainWnd=::AfxGetApp()->GetMainWnd();
	if(MainWnd)
		MainWnd->SendMessage(UM_CHILD_CLOSE,(WPARAM)m_hWnd,0);
}

void CUserInputDlg::Append(CString &input)
{
	m_edtInput.SetSel(m_edtInput.GetWindowTextLength(),-1);
	m_edtInput.ReplaceSel(input);

}

void CUserInputDlg::OnAutoPopUp() 
{
	// TODO: Add your control notification handler code here
	UpdateData();
	
}

BOOL CUserInputDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	CConfig config;
	m_bAutoPop=config.GetBoolean(KEY_USER_INPUT_AUTO_POP,TRUE);
	UpdateData(FALSE);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CUserInputDlg::OnDestroy() 
{
	CDialog::OnDestroy();
	
	// TODO: Add your message handler code here
	CConfig config;
	config.SetBoolean(KEY_USER_INPUT_AUTO_POP,m_bAutoPop);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -