因为CListCtrl只能对第一列编辑,但我想编辑其他的列。
我如何才能获得第二列的某一行的矩形区域坐标啊?
因为想用 if (rect.PtInRect(point))来判断鼠标点击是否在第二列某一行的
矩形区域内。(80分)
另外,像对每一列的编辑,怎样才能把新输入的值保存下来?(20分)
我如何才能获得第二列的某一行的矩形区域坐标啊?
因为想用 if (rect.PtInRect(point))来判断鼠标点击是否在第二列某一行的
矩形区域内。(80分)
另外,像对每一列的编辑,怎样才能把新输入的值保存下来?(20分)
GetItemPosition() 得到每一行的左上角的点。
这下,你要的东西都有了吧。============================================================================
提问题时标题要简明扼要地说明问题内容,切忌使用"急","求救"之类不能说明问题的标题
http://www.betajin.com/alphasun/index.htm 给我发信息请附带原帖地址
http://alphasun.18en.com/ http://shakingtoolkit.9126.com/
DocWizard C++程序文档自动生成工具 | Wave OpenGL | HttpProxy | AjaxParser词法分析
CListCtrl::GetItemPosition
BOOL GetItemPosition( int nItem, LPPOINT lpPoint ) const;Return ValueNonzero if successful; otherwise zero.ParametersnItemThe index of the item whose position is to be retrieved.lpPointAddress of aPOINT structure that receives the position of the item’s upper-left corner, in view coordinates.ResRetrieves the position of a list view item.
LVIR_ICON Returns the bounding rectangle of the icon or small icon.
LVIR_LABEL Returns the bounding rectangle of the entire item, including the icon and label. This is identical to LVIR_BOUNDS.
refReference to a CRect object that contains the coordinates of the subitem’s bounding rectangle.ResThis member function implements the behavior of the Win32 macro,ListView_GetSubItemRect, as described in the Platform SDK.