亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? qsentfontdlg.cpp

?? Led 發送晨曦
?? CPP
字號:
// QSentFontDlg.cpp : implementation file
//

#include "stdafx.h"
#include "QSentFont.h"
#include "QSentFontDlg.h"
#include "membm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
CString showText=("歡迎便用力麒科技LED屏");
class CAboutDlg : public CDialog
{
public:
	CAboutDlg();

// Dialog Data
	//{{AFX_DATA(CAboutDlg)
	enum { IDD = IDD_ABOUTBOX };
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAboutDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	//{{AFX_MSG(CAboutDlg)
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
	//{{AFX_DATA_INIT(CAboutDlg)
	//}}AFX_DATA_INIT
}

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAboutDlg)
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
	//{{AFX_MSG_MAP(CAboutDlg)
		// No message handlers
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CQSentFontDlg dialog

CQSentFontDlg::CQSentFontDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CQSentFontDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CQSentFontDlg)
	m_strFontName = _T("");
	m_strSampText = _T("");
	m_strDisplayText = _T("");
	//}}AFX_DATA_INIT
	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CQSentFontDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CQSentFontDlg)
	DDX_Control(pDX, IDC_STATIC_pict, m_DrawArea);
	DDX_Control(pDX, IDC_SetBt, m_SetBt);
	DDX_Control(pDX, IDC_SelectCOM, m_SelectCom);
	DDX_Control(pDX, IDC_DISPLAYTEXT, m_ctIDisplayText);
	DDX_Control(pDX, IDC_LFONTS, m_ctlFontList);
	DDX_LBString(pDX, IDC_LFONTS, m_strFontName);
	DDX_Text(pDX, IDC_ESAMPTEXT, m_strSampText);
	DDX_Text(pDX, IDC_DISPLAYTEXT, m_strDisplayText);
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CQSentFontDlg, CDialog)
	//{{AFX_MSG_MAP(CQSentFontDlg)
	ON_WM_SYSCOMMAND()
	ON_WM_PAINT()
	ON_WM_QUERYDRAGICON()
	ON_BN_CLICKED(IDC_DFLTMSG, OnDfltmsg)
	ON_BN_CLICKED(IDC_CLRMSG, OnClrmsg)
	ON_LBN_SELCHANGE(IDC_LFONTS, OnSelchangeLfonts)
	ON_EN_CHANGE(IDC_ESAMPTEXT, OnChangeEsamptext)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CQSentFontDlg message handlers

BOOL CQSentFontDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// Add "About..." menu item to system menu.

	// IDM_ABOUTBOX must be in the system command range.
	ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
	ASSERT(IDM_ABOUTBOX < 0xF000);

	CMenu* pSysMenu = GetSystemMenu(FALSE);
	if (pSysMenu != NULL)
	{
		CString strAboutMenu;
		strAboutMenu.LoadString(IDS_ABOUTBOX);
		if (!strAboutMenu.IsEmpty())
		{
			pSysMenu->AppendMenu(MF_SEPARATOR);
			pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
		}
	}

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	
	// TODO: Add extra initialization here
		// Fill the font list box
	FillFontList();
    
	// Initalize the text to be entered
	m_strSampText = "歡迎光臨";
    // Copy the Text to the font sample area
	m_strDisplayText = m_strSampText;
	m_SelectCom.InsertString(0,"COM1");
	m_SelectCom.InsertString(1,"COM2");
	m_SelectCom.InsertString(2,"COM3");
	m_SelectCom.InsertString(3,"COM4");
	m_SelectCom.InsertString(4,"COM5");
	m_SelectCom.InsertString(5,"COM6");
	m_SelectCom.SelectString(-1,"COM1");
	m_SetBt.SelectString(-1,"9600");
	// Update the dialog
	UpdateData(FALSE);
	
	return TRUE;  // return TRUE  unless you set the focus to a control
}

void CQSentFontDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
	if ((nID & 0xFFF0) == IDM_ABOUTBOX)
	{
		CAboutDlg dlgAbout;
		dlgAbout.DoModal();
	}
	else
	{
		CDialog::OnSysCommand(nID, lParam);
	}
}

// If you add a minimize button to your dialog, you will need the code below
//  to draw the icon.  For MFC applications using the document/view model,
//  this is automatically done for you by the framework.

void CQSentFontDlg::OnPaint() 
{

		CPaintDC dc(this); // device context for painting

		//CMemBm
  
	CRect rect ;//占位符矩形

   //char *showText=("歡欣鼓舞go to the windows!");
	

	m_DrawArea.GetWindowRect( &rect );
	ScreenToClient( &rect );

	// 2 - Draw inside placeholder rectangle
	// Draw current shape
	CBrush brShape( RGB( 0, 0, 0 ) );
	CBrush* pOldBrush = dc.SelectObject( &brShape );

	dc.Rectangle( rect );

	CPen pen( PS_SOLID, 2, RGB( 255, 255, 255) );
	CPen* pOldPen = dc.SelectObject( &pen );

	SetBkColor(dc,(0,0,0));
	SetTextColor(dc,(255,255,255));
	TextOut(dc,25,310,showText,strlen(showText));

	dc.SelectObject( pOldPen );
	dc.SelectObject( pOldBrush );
//********************************************

/*
    CMemBm bmSnap( dc, NULL, 0, 0, 715,120 );
	HPEN hPen = CreatePen( PS_SOLID, 1, RGB(255,0,0) );
	HANDLE hOldPen = SelectObject(bmSnap, hPen);
	SetBkColor(bmSnap,(0,0,0));
	SetTextColor(bmSnap,(255,255,255));
	TextOut(bmSnap,0,0,showText,strlen(showText));

	SelectObject(bmSnap, hOldPen);
	DeleteObject(hPen);

bmSnap.Fill( dc,25, 310,715,120, true );
*/	
}

// The system calls this to obtain the cursor to display while the user drags
//  the minimized window.
HCURSOR CQSentFontDlg::OnQueryDragIcon()
{
	return (HCURSOR) m_hIcon;
}

void CQSentFontDlg::OnDfltmsg() 
{
		
	m_strSampText = "歡迎光臨";
    m_strDisplayText = m_strSampText;
showText="歡迎光臨";
RedrawArea();
    UpdateData(FALSE);	
}

void CQSentFontDlg::OnClrmsg() 
{
	m_strSampText = "";
    m_strDisplayText = m_strSampText;
    showText="";
    RedrawArea();
	UpdateData(FALSE);	
}

void CQSentFontDlg::OnSelchangeLfonts() 
{	// MY CODE STARTS HERE

	// Update the variables with the dialog controls
	UpdateData(TRUE);
// Set the font for the sample
	SetMyFont();
	
}
void CQSentFontDlg::SetMyFont()
{
	CRect rRect;
	int iHeight;

	// Has a font been selected?
	if (m_strFontName != "")
	{
		// Get the dimensions of the font sample display area
		m_ctIDisplayText.GetWindowRect(&rRect);
		// Calculate the area height
		iHeight = rRect.top - rRect.bottom;
		// Make sure the height is positive
		if (iHeight < 0)
			iHeight = 0 - iHeight;
		// Release the current font
		m_fSampFont.Detach();
		// create the font to be used
		m_fSampFont.CreateFont((iHeight - 1),0,0,0, FW_NORMAL,
			0,0,0,DEFAULT_CHARSET,OUT_CHARACTER_PRECIS,
			CLIP_CHARACTER_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH | 
			FF_DONTCARE, m_strFontName);

		// Set the font for the sample display area
		m_ctIDisplayText.SetFont(&m_fSampFont);
	}
}
int CALLBACK EnumFontFamProc(LPENUMLOGFONT lpelf,
							 LPNEWTEXTMETRIC lpntm,DWORD nFontType,long lparam)
{
	// Create a pointer to the dialog window
	CQSentFontDlg* pWnd = (CQSentFontDlg*) lparam;

	// add the font name to the list box
	pWnd ->m_ctlFontList.AddString(lpelf ->elfLogFont.lfFaceName);
	// Return 1 to continue font enumeration
	return 1;
}
void CQSentFontDlg::FillFontList()
{
	int iCount;
	int iCurCount;
	CString strCurFont;
	CString strPrevFont = "";	
	LOGFONT lf;

	// Initialize the LOGFONT structure
	lf.lfCharSet = DEFAULT_CHARSET;
	strcpy(lf.lfFaceName,"");
	// clear the list box
	m_ctlFontList.ResetContent();
	// create a device context variable
	CClientDC dc (this);
	// Enumerate the font families
	::EnumFontFamiliesEx((HDC) dc,&lf,
		(FONTENUMPROC) EnumFontFamProc,(LPARAM) this,0);
	
	
	// Get the number of fonts in the list box
	iCount = m_ctlFontList.GetCount();
	// Loop from the last entry in the list box to the first,
	// searching for and deleting the duplicate entries
	for (iCurCount = iCount; iCurCount > 0; iCurCount--)
	{
		// Get the current font name
		m_ctlFontList.GetText((iCurCount - 1), strCurFont);
		// is it the same as the previous font name?
		if (strCurFont == strPrevFont)
		{
			// if yes,then delete it
			m_ctlFontList.DeleteString((iCurCount - 1));
		}
		// Set the previous font name to the current font name
		strPrevFont = strCurFont;
	}
}

void CQSentFontDlg::OnChangeEsamptext() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
		// Update the variables with the dialog controls
	UpdateData(TRUE);

	// copy the current text to the font sample
	m_strDisplayText = m_strSampText;
	showText=m_strSampText;
    RedrawArea();
	// Update the dialog with the variables
	UpdateData(FALSE);

	// TODO: Add your control notification handler code here
	
}
void CQSentFontDlg::RedrawArea()
{
	CRect rect;
	m_DrawArea.GetWindowRect(&rect);
	ScreenToClient(&rect);

	InvalidateRect(rect);
	UpdateWindow();

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美成人精品二区三区99精品| 精品国产乱码久久久久久免费 | 久久久午夜电影| 亚洲欧美在线aaa| 国产一区欧美一区| 欧美日韩亚洲丝袜制服| 中文字幕av一区 二区| 日本不卡不码高清免费观看| 91麻豆成人久久精品二区三区| 欧美v日韩v国产v| 五月激情六月综合| 色噜噜偷拍精品综合在线| 久久精品人人做人人综合| 日本不卡视频在线观看| 在线视频中文字幕一区二区| 中文字幕在线观看不卡| 国产精品1区2区3区| 精品久久久三级丝袜| 亚洲成在线观看| 91麻豆成人久久精品二区三区| 日本一区二区三区dvd视频在线| 久久99在线观看| 日韩午夜激情电影| 蜜桃一区二区三区在线观看| 欧美久久久久中文字幕| 亚洲大片在线观看| 555www色欧美视频| 日韩高清不卡在线| 欧美精品在线观看播放| 日本一区中文字幕| 日韩视频中午一区| 乱中年女人伦av一区二区| 欧美一级高清片| 麻豆91在线观看| 欧美精品一区二区三区在线播放 | 成人免费看视频| 国产欧美久久久精品影院| 国产精品白丝av| 国产精品久久99| 色婷婷亚洲综合| 无码av免费一区二区三区试看| 欧美综合欧美视频| 日韩综合在线视频| 欧美白人最猛性xxxxx69交| 久久精品国产**网站演员| 精品黑人一区二区三区久久| 韩国三级中文字幕hd久久精品| 精品国产伦一区二区三区免费| 国产精品一区二区三区乱码| 国产精品福利av| 欧美亚洲综合另类| 蜜桃精品视频在线观看| 久久久久久久久久看片| 99精品国产视频| 五月激情综合网| 日本一区二区免费在线观看视频| 97se亚洲国产综合在线| 爽好多水快深点欧美视频| 精品粉嫩aⅴ一区二区三区四区| 国产精品一区免费在线观看| 亚洲老妇xxxxxx| 精品国产一区久久| 99久久久无码国产精品| 亚洲成人三级小说| 国产亚洲综合色| 欧美日韩欧美一区二区| 国产成人综合在线观看| 一区二区三区成人在线视频| 日韩一级精品视频在线观看| 国产jizzjizz一区二区| 亚洲成人一二三| 中文字幕日韩av资源站| 日韩欧美一二三区| 99视频超级精品| 久久国产综合精品| 一区二区高清免费观看影视大全| 日韩欧美你懂的| 在线中文字幕一区| 国产精一品亚洲二区在线视频| 一区二区三区中文字幕精品精品| 精品国产伦一区二区三区观看方式| 成人白浆超碰人人人人| 免费在线观看精品| 亚洲乱码中文字幕| 欧美国产精品中文字幕| 欧美片网站yy| 97se亚洲国产综合自在线不卡| 国产专区欧美精品| 五月天激情小说综合| 亚洲卡通动漫在线| 国产精品久久久久毛片软件| 日韩欧美电影一二三| 欧美日韩一级片在线观看| 波多野洁衣一区| 国产精品一区二区在线播放| 麻豆国产精品视频| 日本美女视频一区二区| 亚洲一区二区三区中文字幕在线| 国产精品久线在线观看| 久久久蜜臀国产一区二区| 日韩欧美成人一区| 日韩视频中午一区| 日韩片之四级片| 91.成人天堂一区| 538在线一区二区精品国产| 91高清视频免费看| 一本久久精品一区二区| 93久久精品日日躁夜夜躁欧美| 国产成人综合在线| 国产成人av电影在线播放| 狠狠网亚洲精品| 精品一区二区免费视频| 久久电影网站中文字幕| 毛片av中文字幕一区二区| 日韩av电影免费观看高清完整版在线观看 | 国产91在线看| 国产裸体歌舞团一区二区| 国产一区二区影院| 国产精品夜夜爽| 风间由美一区二区三区在线观看 | 国产精品国产三级国产aⅴ入口| 久久精品在这里| 久久麻豆一区二区| 国产精品午夜免费| 亚洲私人黄色宅男| 亚洲国产精品一区二区久久恐怖片| 亚洲一区二区3| 另类小说图片综合网| 国产在线看一区| 成人app网站| 欧美色综合网站| 日韩你懂的在线观看| 久久精品亚洲国产奇米99| 国产精品久久久久aaaa樱花| 亚洲精品伦理在线| 石原莉奈一区二区三区在线观看| 久久成人羞羞网站| 高清视频一区二区| 欧美体内she精视频| 日韩一区二区电影网| 久久欧美一区二区| 亚洲综合另类小说| 国内精品嫩模私拍在线| 91一区二区在线| 欧美日韩国产一级片| 2023国产精品| 一区二区三区在线观看视频| 热久久一区二区| av不卡在线播放| 欧美一级艳片视频免费观看| 久久精品综合网| 午夜成人免费视频| 成人永久看片免费视频天堂| 欧美日韩国产首页在线观看| 久久蜜桃av一区二区天堂| 夜夜精品视频一区二区| 精品亚洲欧美一区| 91碰在线视频| 国产欧美精品一区二区色综合| 午夜精品视频一区| av不卡在线播放| 久久一区二区三区四区| 亚洲曰韩产成在线| 福利一区二区在线| 3751色影院一区二区三区| 中文字幕在线观看一区二区| 美女视频黄免费的久久| 在线一区二区观看| 国产精品乱码久久久久久| 日韩精品色哟哟| 在线国产电影不卡| 国产精品网站在线| 久久97超碰色| 欧美久久久久久久久久| 一区二区三区四区亚洲| 不卡视频在线观看| 国产日韩欧美综合一区| 免费观看在线色综合| 欧美色手机在线观看| 亚洲美女区一区| 国产盗摄一区二区| 久久久久久影视| 久久国产精品色| 日韩色视频在线观看| 亚洲h动漫在线| 欧美日韩一区精品| 亚洲一线二线三线久久久| 91麻豆视频网站| 亚洲乱码日产精品bd| a4yy欧美一区二区三区| 国产精品天干天干在线综合| 国产毛片精品一区| 337p日本欧洲亚洲大胆精品| 男男成人高潮片免费网站| 欧美一区二区美女| 免费人成在线不卡| 欧美一区二区国产| 蜜臀av性久久久久av蜜臀妖精| 欧美一区二区三区系列电影| 日韩精品91亚洲二区在线观看|