screentoclient

GetWindowRect、GetClientRect、ScreenToClient与ClientToScreen GetWindowRect是取得窗口在屏幕坐标系下的RECT坐标(包括客户区和非客户区),这样可以得到窗口的大小和相对屏幕左上角(0,0)的位置。 GetClientRect取得窗口客户区(不包括非客户区)在客户区坐标系下的RECT坐标,可以得到窗口的大小,而不能得到相对屏幕的位置,因为这个矩阵是在客户区坐标系下(相对于窗口客户区的左上角)的。   用GetClientRect返回的RECT结构... 阅读详情
  name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-5572165936844014&dt=1193665761703&lmt=1193665780&format=336x280_as&output=html&correlator=1193665761687&url=http%3A%2F%2Fwww.codeguru.cn%2Fpublic%2Fiframe%2Fwinapiiframe.htm&color_bg=FFFFFF&color_text=000000&color_link=000000&color_url=FFFFFF&color_border=FFFFFF&ad_type=text&ga_vid=1285758818.1193665762&ga_sid=1193665762&ga_hid=111695597&flash=9&u_h=768&u_w=1024&u_ah=740&u_aw=1024&u_cd=32&u_tz=480&u_his=8&u_java=true" frameborder="0" width="336" scrolling="no" height="280" allowtransparency="allowtransparency">     函数功能:该函数把屏幕上指定点的屏幕坐标转换成用户坐标。

    函数原型:BOOL ScreenToClient(HWND hWnd, LPPOINT lpPoint);

    参数:

    hWnd:指向窗口的句柄,此窗口的用户空间将被用来转换。

    lpPoint:指向POINT结构指针,该结构含有要转换的屏幕坐标。

    返回值:如果函数调用成功,返回值为非零值,否则为零。

    Windows NT:若想获得更多错误信息,请调用GetLastError函数。

    注释:该函数应用hWnd参数标识的窗口和POINT结构给定的屏幕坐标来计算用户坐标,然后以用户坐标来替代屏幕坐,新坐标是相对于指定窗口的领域的左上角。

    速查:Windows NT:3.1及以上版本;Windows:95及以上版本;Windows CE:1.0及以上版本;头文件:winuser.h;库文件:user32.lib。

SAP ERP与金蝶云星空的集成案例(新能源光伏行业) 通过建设PLM、SAP、MES、WMS、SCADA、EAM等多系统集成的工业互联网平台作为数字化工厂的控制中枢,不仅可以实现人员、设备、物料、工艺参数、产品等生产全流程追溯管理,同时也可以根据数据采集进行生产现场的控制调节,最大程度降低能耗水平。销售订单创建下推金蝶采购订单创建修改、销售订单创建下推金蝶销售订单创建修改、销售发货过账下推金蝶采购入库单、销售发货过账下推金蝶销售出库单:在SAP ERP系统创建销售订单、销售发货过账单后推送到云星空系统,进行采购/销售订单的创建修改、完成物料的入库和出库流程。 阅读详情

相关推荐

COCO2017数据集类别分布深度解析

本文深入解析了COCO2017数据集的类别分布情况,包括80个常见物体的分类统计和样本数量分析。通过对比训练集与验证集的分布一致性,探讨了数据均衡性问题,并针对高频和低频类别提出了实用的数据预处理和模型训练建议,帮助优化计算机视觉任务的性能。

weixin_42533751的博客 369

Windows.ScreenToClient

GetWindowRect(rt);//获得的就是客户区的区域坐标,(L,T,R,B); ScreenToClient(rt);//将客户区坐标做为屏幕区再转客户区,L,T就可能为负,除非你将客户区移到屏幕左上角 你应该用: ClientToScreen(rt);//这样rt就是客户区相对于屏幕的坐标了     如果屏幕得到的坐标是x=100,y=100,那转换成客户坐标xy各是多少?

luo809976897的专栏 1299

【TC3xx芯片】TC3xx芯片电源管理系统PMS详解

本文主要介绍了TC3xx芯片的电源管理系统(PMS),重点探讨了供电模式选择、电源监控机制及电源管理模式。文章首先分析了4种供电模式及其硬件配置方式,详细说明了3.3V单电源供电模式的特点;其次阐述了Primary和Secondary两种电源监控机制,包括阈值配置和异常中断处理;最后重点讲解了CPU和系统的电源管理模式,特别对Standby模式及其进入/退出条件进行了详细说明。文章以软件开发视角解析了TC3xx芯片的电源管理功能,为ECU低功耗设计提供了技术参考。

redparrot2008的博客 1526

游戏编程笔记-起步(二)在窗口上绘图

游戏编程笔记-起步(二) 2.在窗口上绘图         看了我上面的分析,我想,很多朋友都迫不及待的想学这部分知识,原因是上面的知识实在太简单了,只要稍懂点算法的同胞们都可以看懂。关键是大家苦于英雄无勇武之地啊!学了n年的算法,做了n到算法题,却写不出一个如此简单的小游戏。 那好,让我们开始我们真正的游戏编程之旅吧! 1.概述        在Windows上绘图

游蓝海 的专栏 7949

STM32 CubeMX实战:手把手教你用I2C驱动IST8310磁力计(附完整代码)

本文详细介绍了如何使用STM32 CubeMX和I2C驱动IST8310磁力计,从硬件连接到代码实现的完整流程。重点讲解了I2C通信异常处理、传感器初始化序列优化以及中断驱动数据采集方案,帮助开发者快速搭建可靠的地磁场数据采集系统。

weixin_42531163的博客 189

AD2428与SigmaStudio:从节点自动配置与EEPROM存储实战

本文详细介绍了AD2428 A2B收发器与SigmaStudio开发环境的集成应用,重点讲解从节点自动配置与EEPROM存储的实战流程。通过硬件连接、属性配置、数据导出及嵌入式系统集成等步骤,实现设备上电自启动,提升汽车音频系统的可靠性与部署效率。

g8f9d0s1a2的博客 650

Linux/XWindow的api函数介绍

     **********************************     *     系统函数                    *      ********************************** -----------------------------------名称  GetScreenMode原型  int GetScreenMode (void)描述 

冰封尘想的专栏 7264

C++实现SM4国密算法实战指南

通过以上实现,开发者可以快速在C++项目中集成SM4国密算法,满足金融、政务等领域的安全需求。实际部署时建议通过国家密码管理局的合规性检测,并定期更新密钥管理策略。库(支持国密算法),需提前安装并配置开发环境。

skyksksksksks的博客 1487

ClientToScreen 和ScreenToClient 用法

ClientToScreen( )是把窗口坐标转换为屏幕坐标 pWnd->GetWindowRect(&rc);是获取整个窗体的大小 pWnd->GetClientRect(&rc1);是获取窗体中客户区的大小 ScreenToClient( )是把屏幕坐标转换为窗口坐标 屏幕坐标是相对于屏幕左上角的,而窗口坐标是相对于窗口用户区左上角的 VC下,有些函数使用

LJH0600301217的专栏 4万+

Python爬虫实战:实时爬取东方财富网股票行情

东方财富网实时行情(价格、涨跌幅、成交量等)K线图、分时图、技术指标市盈率、换手率、总市值等指标相比某些收费API,东方财富网页端接口不需要登录、免费、响应快、封装清晰,适合爬虫实践。东方财富网股票数据接口分析实时数据抓取与字段提取数据结构化处理自动化批量抓取多线程加速采集数据可视化展示支持存储为CSV/Excel/数据库。

2201_76125261的博客 1万+

摆脱英文束缚!群晖Transmission4.0.4全新中文界面攻略

在群晖安装完官方Transmission4.0.4套件后,界面是英文状态的,不太好用。但是按照网上分享的原来4.0以前版本的方法更新UI又失败,所以自己搞了下成功了,分享给需要的朋友。

XiaoqiangClub的博客 5211

ClientToScreen 和ScreenToClient用法

ClientToScreen( )是把窗口坐标转换为屏幕坐标 ScreenToClient( )是把屏幕坐标转换为窗口坐标 屏幕坐标是相对于屏幕左上角的,而窗口坐标是相对于窗口用户区左上角的 VC下,有些函数使用窗口坐标,有些使用屏幕坐标,使用时要分清。 一个窗体分为两部分:系统区和客户区 象标题和菜单之类的是系统区,由系统来控制,客户区就是你的地盘喽!!! Width, Heig

ghevinn欢迎您光临 1万+

pycharm下载continue插件接入DeepSeek的API,向其提问输出乱码,如何解决?

🏆本文收录于 《全栈Bug调优(实战版)》 专栏,该专栏专注于分享我在真实项目开发中遇到的各类疑难Bug及其深层成因,并系统提供高效、可复现的解决思路和实操方案。无论你是刚入行的新手开发者,还是拥有多年项目经验的资深工程师,本专栏都将为你提供一条系统化、高质量的问题排查与优化路径,助力你加速成长,攻克技术壁垒,迈向技术价值最大化与职业发展的更高峰🚀!

**My Coding Family** 2219

VC ScreenToClient与ClientToScreen

The ClientToScreen function replaces the client-area coordinates in the POINT structure with the screen coordinates. The screen coordinates are relative to the upper-left corner of the screen. Note

evil_119的专栏 1158

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

ClientToScreen 和ScreenToClient

ClientToScreen( )是把窗口坐标转换为屏幕坐标ScreenToClient( )是把屏幕坐标转换为窗口坐标屏幕坐标是相对于屏幕左上角的,而窗口坐标是相对于窗口用户区左上角的VC下,有些函数使用窗口坐标,有些使用屏幕坐标,使用时要分清。一个窗体分为两部分:系统区和客户区象标题和菜单之类的是系统区,由系统来控制,客户区就是你的地盘喽!!!Width, Height 是指整体的,Clien...

weixin_33981932的博客 479

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

关于ScreenToClient

顾名思义:ScreenToClient也就是Screen(屏幕坐标) 到 Client(客户区坐标)的转换。也就是说这个函数可以把你在屏幕上鼠标的位置转换为你打开的程序的客户区的坐标(位置)。

专注于机器视觉领域的学习、研究与应用研发 1928

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

GetClientRect、ScreenToClient、GetWindowRect、ClientToScreen、MoveWindow用法总结

函数说明 GetWindowRect 此函数是获取窗体或者控件在屏幕坐标系下的坐标。 若此函数用于窗体初始化函数中,原点位于窗体的左上角; 若此函数在窗体初始化完成之后使用,原点位于屏幕的左上角。 ScreenToClient 此函数是将屏幕坐标转化为客户区坐标。 GetClientRect 此函数是获取窗体或者控件客户区的大小,一般来说,针对窗体还是控件,其获取的Left、Top参数均为0; ClientToScreen 此函数是将客户区坐标转化为屏幕坐标 MoveWindow 针对窗体,使用屏幕坐标;

weixin_43264512的博客 4648

VC++中的GetWindowRect,GetClientRect,ScreenToClient , ClientToScreen();

在VC++中,关于窗口位置的调整,移动,拉伸时总少不了获取控件所在的位置坐标区域, 所以 GetWindowRect,GetClientRect和ScreenToClient必不可少:    GetWindowRect()     得到的是在屏幕坐标系下的RECT(即以屏幕左上角为原点)。        GetClientRect()      得到的是在客户区坐标系下的RECT(即以所在

wangkechuang的专栏 6690

MFC ClientToScreen 和 ScreenToClient

ClientToScreen( )是把窗口坐标转换为屏幕坐标  ScreenToClient( )是把屏幕坐标转换为窗口坐标  屏幕坐标是相对于屏幕左上角的,而窗口坐标是相对于窗口用户区左上角的  VC下,有些函数使用窗口坐标,有些使用屏幕坐标,使用时要分清。      一个窗体分为两部分:系统区和客户区  象标题和菜单之类的是系统区,由系统来控制,客户区就是你的地盘喽!!!

闪落世间的专栏 4067

ScreenToClient GetClientRect

ScreenToClient  该函数实现Screen(屏幕坐标) 到 Client(客户区坐标)的转换。也就是说这个函数可以把在屏幕上鼠标的坐标转换为程序的客户区的坐标。 可以配合CRect::PtInRect(ptClient)使用来判断某个坐标是否在某个区域内。 CPoint ptClient = point; ScreenToClient(&ptClient);

shuihappy1的博客 513

MFC GetWindowRect, GetClientRect和ScreenToClient

<br />网上说,<br />“GetWindowRect()      得到的是在屏幕坐标系下的RECT(即以屏幕左上角为原点)<br />GetClientRect()      得到的是在客户区坐标系下的RECT(即以所在窗口左上角为原点,去掉了标题栏计算,仅仅是个大小,返回值的左上角永远为0,0) <br />ScreenToClient()      就是把屏幕坐标系下的RECT坐标转换为客户区坐标系下的RECT坐标”<br />对于dialog中的一个button对象,通过GetWindowR

iceiilin的专栏 5086

ScreenToClient

ScreenToClient  函数功能:该函数把屏幕上指定点的屏幕坐标转换成用户坐标。  函数原型:BOOL ScreenToClient(HWND hWnd, LPPOINT lpPoint);  参数:  hWnd:指向窗口的句柄,此窗口的用户空间将被用来转换。  lpPoint:指向POINT结构指针,该结构含有要转换的屏幕坐标。  返回值:如果函数调用成功,返回值为非零值,否则为零。  

工作是我的生活 我为工作而陶醉 944

ScreenToClient 和 ClientToScreen

GetWindowRect是取得窗口在屏幕坐标系下的RECT坐标(包括客户区和非客户区),这样可以得到窗口的大小和相对屏幕左上角(0,0)的位置。   GetClientRect取得窗口客户区(不包括非客户区)在客户区坐标系下的RECT坐标,可以得到窗口的大小,而不能得到相对屏幕的位置,因为这个矩阵是在客户区坐标系下(相对于窗口客户区的左上角)的。   用GetClientRect返回的REC

xringm的博客 947
上一篇: savedc
下一篇: selectcliprgn
WinApiExample
博客等级 码龄19年 2粉丝 663原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值