开发者

Set EditCtrl position for CustomDraw ListView

I made a custom-drawn listview by implementing the NM_CUSTOMDRAW of WM_NOTIFY message.

The listview's look is very similar with the Icon view of listview, but the tile size is much bigger.

so the label position of the item is lower than Icon view's.

PROBLEM: when i edit the item's label, the inplace edit control appears on middle of the item.

Set EditCtrl position for CustomDraw ListView

I tried to get the HWND of edit cont开发者_StackOverflow社区rol with ListView_GetEditControl() then adjusted the window position (GetWindowRect,SetWindowPos) but not worked.

How can I properly locate the edit control window on the label area?


Intercept LVN_BEGINLABELEDIT, and at that time you can use LVM_GETEDITCONTROL to get to the edit and reposition it.

Martyn

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜