returnHTREEITEM::SendMessagehWnd,TVM_INSERTITEM,0,LPARAM&tvis;
佚名通过本文主要向大家介绍了insertitem,insertitem用法,clistctrl insertitem,ctreectrl insertitem,m list.insertitem等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: return HTREEITEM::SendMessagehWnd, TVM_INSERTITEM, 0, LPARAM&tvis;
描述:
解决方案1:
描述:
可以这么用吗?SendMessage()不是返回的是LRESULT吗,可以转换为HTREEITEM?
解决方案1:
当然可以。
摘自Msdn:
To send this message, call the SendMessage function as follows.
lResult = SendMessage( // returns LRESULT in lResult
(HWND)hWndControl, // handle to destination control
(UINT)TVM_INSERTITEM, // message ID
(WPARAM) wParam, // = 0; not used, must be zero
(LPARAM) lParam // = (LPARAM) (LPTVINSERTSTRUCT) lpis; );
Returns the handle to the new item if successful, or NULL otherwise
当然可以,具体的消息返回的LRESULT是当作不同的东西来用的。
MSDN上都会说明。