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

📄 识别鼠标是放在文本文件上还是控件上.txt

📁 图像处理学习的一些心得
💻 TXT
字号:
用WindowFromPoint或ChildWindowFromPoint获得控件的句柄,然后用GetClassName判断窗口类,文本框是Edit,按钮是Button


The WindowFromPoint function retrieves a handle to the window that contains the specified point. 

HWND WindowFromPoint(
  POINT Point  // point
);


int GetClassName(
  HWND hWnd,           // handle to window
  LPTSTR lpClassName,  // class name
  int nMaxCount        // size of class name buffer
);
Parameters
hWnd 
[in] Handle to the window and, indirectly, the class to which the window belongs. 
lpClassName 
[out] Pointer to the buffer that is to receive the class name string. 
nMaxCount 
[in] Specifies the length, in TCHARs, of the buffer pointed to by the lpClassName parameter. The class name string is truncated if it is longer than the buffer. 

⌨️ 快捷键说明

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