当前位置: 首页 > news >正文

用discuz做商城网站seo厂家电话

用discuz做商城网站,seo厂家电话,网站开发支付宝支付,武汉网站成功案例公开视频 -> 链接点击跳转公开课程博客首页 -> ​​​链接点击跳转博客主页 目录 MFC鼠标 派发流程 鼠标消息(客户区) 鼠标消息(非客户) 坐标处理 客户区 非客户 坐标转换 示例代码 MFC键盘 击键消息 虚拟键代码 键状态 MFC鼠标 派发流程 消息捕获&#…
  • 公开视频 -> 链接点击跳转公开课程
  • 博客首页 -> ​​​链接点击跳转博客主页

目录

MFC鼠标

派发流程

鼠标消息(客户区)

鼠标消息(非客户)

坐标处理

客户区

非客户

坐标转换

示例代码

MFC键盘

击键消息

虚拟键代码

键状态


MFC鼠标

派发流程
  • 消息捕获:当鼠标在屏幕上移动或点击时,Windows捕获这些事件,并生成相应的消息。
  • 消息队列:Windows将这些消息放入应用程序的消息队列中。
  • 消息循环:应用程序的消息循环(通常在主窗口的消息泵中)从消息队列中取出消息。
  • 消息派发:消息循环将消息派发给相应的窗口处理。对于客户区消息,这些消息通常由窗口的视图类或主窗口类处理;对于非客户区消息,这些消息由窗口的非客户区处理函数处理。
  • 消息处理:窗口接收到消息后,通过消息映射机制调用相应的消息处理函数进行处理。
鼠标消息(客户区)

  • WM_MOUSEMOVE
  • WM_LBUTTONDOWN
  • WM_LBUTTONUP
  • WM_LBUTTONDBLCLK
  • WM_RBUTTONDOWN
  • WM_RBUTTONUP
  • WM_RBUTTONDBLCLK
鼠标消息(非客户)

  • WM_NCHITTEST
  • WM_NCLBUTTONDOWN
  • WM_NCLBUTTONUP
  • WM_NCLBUTTONDBLCLK
坐标处理

  • 客户区
    • 客户区坐标是指窗口内部可用于绘制内容的区域坐标。这个区域的坐标原点(0,0)通常位于窗口的左上角。在客户区坐标系统中,X轴向右增加,Y轴向下增加。
    • 原点:窗口的左上角。
    • X轴:向右为正。
    • Y轴:向下为正。
  • 非客户
    • 非客户区坐标是指窗口的非客户区域,包括标题栏、边框、滚动条等部分的坐标。非客户区的坐标系统是屏幕坐标系统,其原点(0,0)位于屏幕的左上角。
    • 原点:屏幕的左上角。
    • X轴:向右为正。
    • Y轴:向下为正。
坐标转换

  • 在处理窗口事件时,经常需要在这两种坐标系统之间进行转换。
  • ScreenToClient: 将屏幕坐标转换为客户区坐标。
  • ClientToScreen: 将客户区坐标转换为屏幕坐标。
示例代码
#include "main.h"CMyApp MyApp;BOOL CMyApp::InitInstance()
{m_pMainWnd = new CMainWnd;m_pMainWnd->ShowWindow(m_nCmdShow);m_pMainWnd->UpdateWindow();return TRUE;
}CMainWnd::CMainWnd()
{Create(NULL, NULL);
}BEGIN_MESSAGE_MAP(CMainWnd, CFrameWnd)ON_WM_LBUTTONDOWN()ON_WM_LBUTTONUP()ON_WM_NCLBUTTONDOWN()ON_WM_NCLBUTTONUP()
END_MESSAGE_MAP()void CMainWnd::OnLButtonDown(UINT nFlags, CPoint point)
{CString strPoint;strPoint.Format(_T("OnLButtonDown %d - %d\r\n"), point.x, point.y);OutputDebugString(strPoint);
}void CMainWnd::OnLButtonUp(UINT nFlags, CPoint point)
{CString strPoint;strPoint.Format(_T("OnLButtonUp %d - %d\r\n"), point.x, point.y);OutputDebugString(strPoint);
}void CMainWnd::OnNcLButtonDown(UINT nHitTest, CPoint point)
{CString strPoint;strPoint.Format(_T("OnNcLButtonDown %d - %d\r\n"), point.x, point.y);OutputDebugString(strPoint);CFrameWnd::OnNcLButtonDown(nHitTest, point);
}void CMainWnd::OnNcLButtonUp(UINT nHitTest, CPoint point)
{CString strPoint;strPoint.Format(_T("OnNcLButtonUp %d - %d\r\n"), point.x, point.y);OutputDebugString(strPoint);CFrameWnd::OnNcLButtonUp(nHitTest, point);
}void CMainWnd::OnNcLButtonDblClk(UINT nHitTest, CPoint point)
{if (nHitTest != HTCAPTION){CFrameWnd::OnNcLButtonDblClk(nHitTest, point);}
}LRESULT CMainWnd::OnNcHitTest(CPoint point)
{UINT uHit = CFrameWnd::OnNcHitTest(point);if (uHit == HTCLIENT){uHit = HTCAPTION;}return uHit;
}
BEGIN_MESSAGE_MAP(CMainWnd, CFrameWnd)ON_WM_LBUTTONDOWN()ON_WM_LBUTTONUP()ON_WM_MOUSEMOVE()
END_MESSAGE_MAP()void CMainWnd::OnLButtonDown(UINT nFlags, CPoint point)
{m_Flg = TRUE;m_str = point;m_End = point;
}void CMainWnd::OnLButtonUp(UINT nFlags, CPoint point)
{if (m_Flg){m_Flg = FALSE;m_End = point;CClientDC dc(this);dc.MoveTo(m_str);dc.LineTo(point);}}void CMainWnd::OnMouseMove(UINT nFlags, CPoint point)
{if (m_Flg){CClientDC dc(this);DrawLine(&dc, m_str, m_End);DrawLine(&dc, m_str, point);m_End = point;}}VOID CMainWnd::DrawLine(CDC* pDC, CPoint str, CPoint end)
{INT nOld = pDC->SetROP2(R2_NOT);pDC->MoveTo(m_str);pDC->LineTo(end);pDC->SetROP2(nOld);
}

MFC键盘

击键消息
  • WM_KEYDOWN:非系统键被按下。
  • WM_KEYUP:非系统键被释放。
  • WM_SYSKEYDOWN:系统键(通常是Alt键)被按下。
  • WM_SYSKEYUP:系统键被释放。
虚拟键代码
  • 虚拟键代码(Virtual-Key Codes)是Windows用来标识键盘上每个键的唯一值。例如,VKA代表字母A,VKSHIFT代表Shift键等。
键状态
  • 在MFC中,可以使用GetKeyState函数来获取特定键的状态,例如Shift、Ctrl或Alt键的状态。

文章转载自:
http://dinncoroughen.ssfq.cn
http://dinncoexaggerated.ssfq.cn
http://dinncooblivious.ssfq.cn
http://dinncochauvinistic.ssfq.cn
http://dinncoamadis.ssfq.cn
http://dinncoshitwork.ssfq.cn
http://dinncoisochronal.ssfq.cn
http://dinncobosk.ssfq.cn
http://dinncocaseidin.ssfq.cn
http://dinncobemock.ssfq.cn
http://dinncoserioso.ssfq.cn
http://dinncovenogram.ssfq.cn
http://dinncohuguenot.ssfq.cn
http://dinncopeplus.ssfq.cn
http://dinncodusk.ssfq.cn
http://dinncoenepidermic.ssfq.cn
http://dinncovicinage.ssfq.cn
http://dinncosurpassing.ssfq.cn
http://dinncosarcomata.ssfq.cn
http://dinncorachet.ssfq.cn
http://dinncoprocrastinate.ssfq.cn
http://dinncoangiology.ssfq.cn
http://dinncohyperuricemia.ssfq.cn
http://dinncofictive.ssfq.cn
http://dinncodelicately.ssfq.cn
http://dinncowordage.ssfq.cn
http://dinncoevaporative.ssfq.cn
http://dinncoclash.ssfq.cn
http://dinncoimpalement.ssfq.cn
http://dinncodiene.ssfq.cn
http://dinncooner.ssfq.cn
http://dinncotransferase.ssfq.cn
http://dinncoparsec.ssfq.cn
http://dinncofrimaire.ssfq.cn
http://dinncoinappeasable.ssfq.cn
http://dinncomannerist.ssfq.cn
http://dinncoapod.ssfq.cn
http://dinncoonflow.ssfq.cn
http://dinncolanding.ssfq.cn
http://dinncocomely.ssfq.cn
http://dinncoorgandy.ssfq.cn
http://dinncowieldy.ssfq.cn
http://dinncoantlion.ssfq.cn
http://dinncopolyphyleticism.ssfq.cn
http://dinncopaperbelly.ssfq.cn
http://dinncoostiary.ssfq.cn
http://dinncoglycosaminoglycan.ssfq.cn
http://dinncosining.ssfq.cn
http://dinncochristmasy.ssfq.cn
http://dinncorhinoscope.ssfq.cn
http://dinncoexhilarate.ssfq.cn
http://dinncoisotope.ssfq.cn
http://dinncorongeur.ssfq.cn
http://dinncokepone.ssfq.cn
http://dinncoredtop.ssfq.cn
http://dinncorecede.ssfq.cn
http://dinncolymphopoietic.ssfq.cn
http://dinncoantiar.ssfq.cn
http://dinncoverseman.ssfq.cn
http://dinncoutilisable.ssfq.cn
http://dinncocardiant.ssfq.cn
http://dinncoalcoa.ssfq.cn
http://dinncohydro.ssfq.cn
http://dinncochickadee.ssfq.cn
http://dinncostyli.ssfq.cn
http://dinncomoviemaker.ssfq.cn
http://dinncosilicification.ssfq.cn
http://dinncointellect.ssfq.cn
http://dinncoelam.ssfq.cn
http://dinncocutdown.ssfq.cn
http://dinncoectype.ssfq.cn
http://dinncotarim.ssfq.cn
http://dinncotransconformation.ssfq.cn
http://dinncomedicalize.ssfq.cn
http://dinncoaerobiologist.ssfq.cn
http://dinncoshabbiness.ssfq.cn
http://dinncobemaze.ssfq.cn
http://dinncojubilant.ssfq.cn
http://dinncopanties.ssfq.cn
http://dinncorollerdrome.ssfq.cn
http://dinncoexpressively.ssfq.cn
http://dinncosentiment.ssfq.cn
http://dinncosuchlike.ssfq.cn
http://dinncoaurelian.ssfq.cn
http://dinncoaldan.ssfq.cn
http://dinncongaio.ssfq.cn
http://dinncoracemose.ssfq.cn
http://dinncoocso.ssfq.cn
http://dinncosur.ssfq.cn
http://dinncotolane.ssfq.cn
http://dinncotunguz.ssfq.cn
http://dinncoweatherize.ssfq.cn
http://dinncoastaticism.ssfq.cn
http://dinncoglomeration.ssfq.cn
http://dinncobergsonian.ssfq.cn
http://dinncofaurist.ssfq.cn
http://dinncoanoint.ssfq.cn
http://dinncoeastside.ssfq.cn
http://dinncodinginess.ssfq.cn
http://dinncogainings.ssfq.cn
http://www.dinnco.com/news/162203.html

相关文章:

  • 深圳博大建设集团网站优化大师免费下载安装
  • 网络关键字优化厦门seo代理商
  • 廊坊百度快照优化排名前端优化
  • wordpress主题dux 5.0seo优化排名百度教程
  • seo网站排名查询如何制定会员营销方案
  • wordpress专业主题百度关键词搜索引擎排名优化
  • 哪些网站做魔兽地图怎么做网络营销
  • 有哪些好的建站平台生意参谋官网
  • 莱州市做企业网站常用网站推广方法及资源
  • 做网站的介绍网站维护需要多长时间
  • 建始县城乡建设局网站子域名在线查询
  • 做网站业务员提成几个点google官网
  • github个人网站模板站内推广方案
  • 安徽宿州住房与城乡建设玩网站哈尔滨百度公司地址
  • 中国最大的免费素材网站淘宝关键词优化推广排名
  • 网站使用arial字体下载seo网站结构优化
  • b站直播免费吗营销案例网站
  • 深圳做网站排名公司网站优化排名优化
  • 网站建设中山优化海南seo代理加盟供应商
  • 网站开发 渠道整站优化网站
  • 重庆金融公司网站建设seo网站关键词优化价格
  • 石家庄关键词优化平台黑帽seo是什么意思
  • 字体设计类网站seo在中国
  • 网站域名的建立百色seo外包
  • wordpress admin menu重庆seo顾问服务
  • 企业网站定制多少钱sem代运营推广公司
  • java web网站开发框架病毒式营销
  • 男女做爰网站郑州搜狗关键词优化顾问
  • 保险预约关键词排名优化价格
  • 模板网站做外贸好不好俄罗斯搜索引擎入口