当前位置:网站首页>MFC sends left click, double click, and right click messages to list controls
MFC sends left click, double click, and right click messages to list controls
2022-07-06 07:58:00 【donghuangliuyun】
void CTestsetting::SendClickToList()
{
NMITEMACTIVATE NMItemActive;
NMHDR thdr;
thdr.code = NM_CLICK; //NM_CLICK single click NM_DBLCKL double-click NM_RCLICK Right click
thdr.hwndFrom = m_TestsetList.m_hWnd; //m_TestList Is the variable associated with the list control
thdr.idFrom = IDC_TESTSETTING_LIST; //IDC_TESTSETTING_LIST List control ID
NMItemActive.hdr = thdr;
NMItemActive.iItem = m_TestsetList.GetItemCount();
NMItemActive.iItem = 0; // Set the selected row
NMItemActive.iSubItem = 1; // Set the selected column
m_TestsetList.SetSelectionMark(0);
SendMessage(WM_NOTIFY, IDC_TESTSETTING_LIST, (LPARAM)&NMItemActive); // Send the message to the parent window where the list is located , Forwarded by the parent window , Instead of forwarding directly to the list
}
Add list left click response function
void CTestsetting::OnNMClickTestsettingList(NMHDR* pNMHDR, LRESULT* pResult)
{
// Because it is a test, it is a variable written casually
LPNMITEMACTIVATE temp = (LPNMITEMACTIVATE)pNMHDR;// Convert the incoming message into LPNMITEMACTIVAT
int nItem = temp->iItem;// Get line number
int nSubItem = temp->iSubItem;// Get column number
TRACE("%d, %d\n", nItem, nSubItem);
*pResult = 0;
}
边栏推荐
- Solution: système de surveillance vidéo intelligent de patrouille sur le chantier
- Pre knowledge reserve of TS type gymnastics to become an excellent TS gymnastics master
- esRally国内安装使用避坑指南-全网最新
- [untitled]
- Entity class design for calculating age based on birthday
- PHP Coding Standard
- 2.10transfrom attribute
- Learn Arduino with examples
- Asia Pacific Financial Media | "APEC industry +" Western Silicon Valley invests 2trillion yuan in Chengdu Chongqing economic circle to catch up with Shanghai | stable strategy industry fund observatio
- Qualitative risk analysis of Oracle project management system
猜你喜欢
Understanding of law of large numbers and central limit theorem
Basics of reptile - Scratch reptile
Uibehavior, a comprehensive exploration of ugui source code
"Designer universe" Guangdong responds to the opinions of the national development and Reform Commission. Primary school students incarnate as small community designers | national economic and Informa
[t31zl intelligent video application processor data]
Google可能在春节后回归中国市场。
octomap averageNodeColor函数说明
23. Update data
Asia Pacific Financial Media | designer universe | Guangdong responds to the opinions of the national development and Reform Commission. Primary school students incarnate as small community designers
【T31ZL智能视频应用处理器资料】
随机推荐
The State Economic Information Center "APEC industry +" Western Silicon Valley will invest 2trillion yuan in Chengdu Chongqing economic circle, which will surpass the observation of Shanghai | stable
Simulation of holographic interferogram and phase reconstruction of Fourier transform based on MATLAB
数据治理:误区梳理篇
Webrtc series-h.264 estimated bit rate calculation
CAD ARX 获取当前的视口设置
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
http缓存,强制缓存,协商缓存
TS 体操 &(交叉运算) 和 接口的继承的区别
[redis] Introduction to NoSQL database and redis
Uibehavior, a comprehensive exploration of ugui source code
Yu Xia looks at win system kernel -- message mechanism
Simulation of Michelson interferometer based on MATLAB
Secure captcha (unsafe verification code) of DVWA range
Basics of reptile - Scratch reptile
2.10transfrom attribute
Notes on software development
P3047 [USACO12FEB]Nearby Cows G(树形dp)
Comparison of usage scenarios and implementations of extensions, equal, and like in TS type Gymnastics
Redis list detailed explanation of character types yyds dry goods inventory
Epoll and IO multiplexing of redis