开发者

Set EditCtrl position for CustomDraw ListView

开发者 https://www.devze.com 2023-03-13 02:19 出处:网络
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,

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

精彩评论

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