91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 53.71MB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2022-07-01
  • 語言: C/C++
  • 標(biāo)簽: MFC??16進(jìn)制??串口??

資源簡介

利用MFC實(shí)現(xiàn)串口通信,用到MSCOMM32控件,能控制發(fā)送的時(shí)間,最短1ms,同時(shí)支持16進(jìn)制和字符型的接收和發(fā)送,功能很強(qiáng)大,基于VS2010編寫,研究MFC串口通信的同學(xué)值得擁有!

資源截圖

代碼片段和文件信息

#include?“StdAfx.h“
#include?“CvvImage.h“
//////////////////////////////////////////////////////////////////////
//?Construction/Destruction
//////////////////////////////////////////////////////////////////////
CV_INLINE?RECT?NormalizeRect(?RECT?r?);
CV_INLINE?RECT?NormalizeRect(?RECT?r?)
{
???int?t;
???if(?r.left?>?r.right?)
???{
??????t?=?r.left;
??????r.left?=?r.right;
??????r.right?=?t;
???}
???if(?r.top?>?r.bottom?)
???{
??????t?=?r.top;
??????r.top?=?r.bottom;
??????r.bottom?=?t;
???}

???return?r;
}
CV_INLINE?CvRect?RectToCvRect(?RECT?sr?);
CV_INLINE?CvRect?RectToCvRect(?RECT?sr?)
{
???sr?=?NormalizeRect(?sr?);
???return?cvRect(?sr.left?sr.top?sr.right?-?sr.left?sr.bottom?-?sr.top?);
}
CV_INLINE?RECT?CvRectToRect(?CvRect?sr?);
CV_INLINE?RECT?CvRectToRect(?CvRect?sr?)
{
???RECT?dr;
???dr.left?=?sr.x;
???dr.top?=?sr.y;
???dr.right?=?sr.x?+?sr.width;
???dr.bottom?=?sr.y?+?sr.height;

???return?dr;
}
CV_INLINE?IplROI?RectToROI(?RECT?r?);
CV_INLINE?IplROI?RectToROI(?RECT?r?)
{
???IplROI?roi;
???r?=?NormalizeRect(?r?);
???roi.xOffset?=?r.left;
???roi.yOffset?=?r.top;
???roi.width?=?r.right?-?r.left;
???roi.height?=?r.bottom?-?r.top;
???roi.coi?=?0;

???return?roi;
}
void??FillBitmapInfo(?BITMAPINFO*?bmi?int?width?int?height?int?bpp?int?origin?)
{
???assert(?bmi?&&?width?>=?0?&&?height?>=?0?&&?(bpp?==?8?||?bpp?==?24?||?bpp?==?32));

???BITMAPINFOHEADER*?bmih?=?&(bmi->bmiHeader);

???memset(?bmih?0?sizeof(*bmih));
???bmih->biSize?=?sizeof(BITMAPINFOHEADER);
???bmih->biWidth?=?width;
???bmih->biHeight?=?origin???abs(height)?:?-abs(height);
???bmih->biPlanes?=?1;
???bmih->biBitCount?=?(unsigned?short)bpp;
???bmih->biCompression?=?BI_RGB;
???if(?bpp?==?8?)
???{
??????RGBQUAD*?palette?=?bmi->bmiColors;
??????int?i;
??????for(?i?=?0;?i???????{
?????????palette[i].rgbBlue?=?palette[i].rgbGreen?=?palette[i].rgbRed?=?(BYTE)i;
?????????palette[i].rgbReserved?=?0;
??????}
???}
}
CvvImage::CvvImage()
{
???m_img?=?0;
}
void?CvvImage::Destroy()
{
???cvReleaseImage(?&m_img?);
}
CvvImage::~CvvImage()
{
???Destroy();
}
bool??CvvImage::Create(?int?w?int?h?int?bpp?int?origin?)
{
???const?unsigned?max_img_size?=?10000;

???if(?(bpp?!=?8?&&?bpp?!=?24?&&?bpp?!=?32)?||
??????(unsigned)w?>=??max_img_size?||?(unsigned)h?>=?max_img_size?||
??????(origin?!=?IPL_ORIGIN_TL?&&?origin?!=?IPL_ORIGIN_BL))
???{
??????assert(0);?//?most?probably?it?is?a?programming?error
??????return?false;
???}
???if(?!m_img?||?Bpp()?!=?bpp?||?m_img->width?!=?w?||?m_img->height?!=?h?)
???{
??????if(?m_img?&&?m_img->nSize?==?sizeof(IplImage))
?????????Destroy();
??????/*?prepare?IPL?header?*/
??????m_img?=?cvCreateImage(?cvSize(?w?h?)?IPL_DEPTH_8U?bpp/8?);
???}
???if(?m_img?)
??????m_img->origin?=?origin?==?0???IPL_ORIGIN_TL?:?IPL_ORIGIN_BL;
???return?m_img?!=?0;
}
void??CvvImage::CopyOf(?CvvImage&?image?int?desired_color?)
{
???IplImage*?img?=?image.GetI

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件?????180736??2015-05-31?12:12??利用MFC實(shí)現(xiàn)串口通信\Debug\serial_port.exe

?????文件????????667??2015-05-31?10:27??利用MFC實(shí)現(xiàn)串口通信\Debug\serial_port.exe.manifest

?????文件????1625456??2015-05-31?12:12??利用MFC實(shí)現(xiàn)串口通信\Debug\serial_port.ilk

?????文件????6401024??2015-05-31?12:12??利用MFC實(shí)現(xiàn)串口通信\Debug\serial_port.pdb

?????文件???89522176??2015-05-31?12:13??利用MFC實(shí)現(xiàn)串口通信\ipch\serial_port-63d0775e\serial_port-d867318a.ipch

?????文件??????99328??2015-05-31?12:13??利用MFC實(shí)現(xiàn)串口通信\Release\serial_port.exe

?????文件????????667??2015-05-29?16:17??利用MFC實(shí)現(xiàn)串口通信\Release\serial_port.exe.manifest

?????文件????5352448??2015-05-31?12:13??利用MFC實(shí)現(xiàn)串口通信\Release\serial_port.pdb

?????文件???????7163??2012-08-09?11:41??利用MFC實(shí)現(xiàn)串口通信\serial_port\CvvImage.cpp

?????文件???????2007??2012-08-09?11:41??利用MFC實(shí)現(xiàn)串口通信\serial_port\CvvImage.h

?????文件???????8750??2015-05-31?12:12??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\cl.command.1.tlog

?????文件?????213990??2015-05-31?12:12??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\CL.read.1.tlog

?????文件???????7742??2015-05-31?12:12??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\CL.write.1.tlog

?????文件?????131393??2015-05-31?11:31??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\CvvImage.obj

?????文件??????????2??2015-05-31?12:12??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\link-cvtres.read.1.tlog

?????文件??????????2??2015-05-31?12:12??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\link-cvtres.write.1.tlog

?????文件???????6226??2015-05-31?12:12??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\link.command.1.tlog

?????文件??????16012??2015-05-31?12:12??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\link.read.1.tlog

?????文件???????3214??2015-05-31?12:12??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\link.write.1.tlog

?????文件??????22429??2015-05-31?11:31??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\mscomm1.obj

?????文件???????1738??2015-05-31?12:12??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\mt.command.1.tlog

?????文件???????1422??2015-05-31?12:12??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\mt.read.1.tlog

?????文件????????482??2015-05-31?12:12??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\mt.write.1.tlog

?????文件???????1282??2015-05-31?11:31??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\rc.command.1.tlog

?????文件???????6446??2015-05-31?11:31??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\rc.read.1.tlog

?????文件????????642??2015-05-31?11:31??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\rc.write.1.tlog

?????文件???????1970??2015-05-31?10:27??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\serial_port.Build.CppClean.log

?????文件????????381??2015-05-31?12:12??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\serial_port.exe.intermediate.manifest

?????文件?????????90??2015-05-31?12:12??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\serial_port.lastbuildstate

?????文件???????1391??2015-05-31?12:12??利用MFC實(shí)現(xiàn)串口通信\serial_port\Debug\serial_port.log

............此處省略68個(gè)文件信息

評論

共有 條評論