简体   繁体   中英

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. 问题截图

I tried to get the HWND of edit control 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM