可以这么用吗?SendMessage()不是返回的是LRESULT吗,可以转换为HTREEITEM?

解决方案 »

  1.   

    当然可以,具体的消息返回的LRESULT是当作不同的东西来用的。
    MSDN上都会说明。
      

  2.   

    当然可以。
    摘自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