帮我修改一下代码:void CMySpin::OnLButtonUp(UINT nFlags, CPoint point)
{
CWnd *pWnd = GetFocus();// 这句错误。点击SPIN时焦点在其配偶控件EDIT上。
// 那么怎么得到当前点击SPIN的ID????
int id = pWnd->GetDlgCtrlID();
if(IDC_SPIN1==id)
{
.
.
.
}
大家可以参考:
http://community.csdn.net/Expert/topic/4345/4345014.xml?temp=.1558954
{
CWnd *pWnd = GetFocus();// 这句错误。点击SPIN时焦点在其配偶控件EDIT上。
// 那么怎么得到当前点击SPIN的ID????
int id = pWnd->GetDlgCtrlID();
if(IDC_SPIN1==id)
{
.
.
.
}
大家可以参考:
http://community.csdn.net/Expert/topic/4345/4345014.xml?temp=.1558954
解决方案 »
- 利用Mscomm串口通信问题
- 散分!!!
- 求 算法详细说明 《内附C++程序》
- 鼠标实际点击、SendInput模仿鼠标点击,这2者有什么区别?
- 关于【键盘消息】的极简单问题,(UP有分)
- XML文件中存储密文的问题,Up有分!!!
- 终于搞定一个棘手的问题,心情爽,散分啊,呵呵呵
- 各位大哥,向大家请教一个Socket通讯的问题,请指教!
- 怎样改变listbox的背景颜色
- 用VC建立数据库工程时,为什么会出现"visual database tools is not configered properly,please reinstall"的错误提示?如何解决?
- 下载图书的好地方
- 【开源】一个自己封装的xml类
WindowFromPoint
The WindowFromPoint function retrieves a handle to the window that contains the specified point. HWND WindowFromPoint(
POINT Point // point
);
int id = GetDlgCtrlID();
if(IDC_SpinAbsorberSpeed==id)
{
}
else if(IDC_SpinCurrentUseRatio==id)
{
b=200;
}
else if(IDC_SpinFuelUseRatio==id)
{
b=400;
} CString strB;
strB.Format(_T("%d"), b);
AfxMessageBox(strB);