Recent

Author Topic: WinAPI - TreeView - case WM_NOTIFY  (Read 3731 times)

elite001

  • Newbie
  • Posts: 5
WinAPI - TreeView - case WM_NOTIFY
« on: January 17, 2016, 02:43:45 pm »
hello everyone.. sorry for my english..
 i've got a trouble..
i write treeview-automation dll...
in "Case msg of" section of "wndproc function" i need to use WM_NOTIFY... but nothing works.. even
Code: Pascal  [Select][+][-]
  1.  WM_NOTIFY: exit;  
- i cant click on TreeView Node and mouse cursor above created form becomes bothside-arrow or standby (windows7)...
if i comment this switch - i can navigate by treeview, click on nodes etc..
---
 what to do and who is guilty  :)
thank you!

Laz 1.4.4 x86
Win7 x64

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: WinAPI - TreeView - case WM_NOTIFY
« Reply #1 on: January 17, 2016, 03:37:54 pm »
When you are done processing WM_NOTIFY, call the original WndProc:
Code: Pascal  [Select][+][-]
  1.   Result := CallWindowProc(OrgWndProc, aHwnd, uMsg, wParam, lParam);
  2.  

or the default WndProc:
Code: Pascal  [Select][+][-]
  1.   Result := DefWindowProc(aHwnd, uMsg, wParam, lParam)
  2.  

elite001

  • Newbie
  • Posts: 5
Re: WinAPI - TreeView - case WM_NOTIFY
« Reply #2 on: January 17, 2016, 10:13:05 pm »
When you are done processing WM_NOTIFY, call the original WndProc:
Code: Pascal  [Select][+][-]
  1.   Result := CallWindowProc(OrgWndProc, aHwnd, uMsg, wParam, lParam);
  2.  

or the default WndProc:
Code: Pascal  [Select][+][-]
  1.   Result := DefWindowProc(aHwnd, uMsg, wParam, lParam)
  2.  

thats great.. thank you.. )))
all works properly, (^_^)



Code: Pascal  [Select][+][-]
  1. function OrdWndProc (wnd: hwnd; msg: integer; wparam: wparam; lparam: lparam):lresult;stdcall;
  2. begin
  3.   ...
  4.   result := defwindowproc(wnd,msg,wparam,lparam);
  5. end;                                                
  6.  
  7. ...
  8. case msg of
  9.   WM_NOTIFY:
  10.   begin
  11.     Result := CallWindowProc(@OrdWndProc, wnd, Msg, wParam, lParam);
  12.   end;
  13. else
  14.   result := defwindowproc(wnd,msg,wparam,lparam);
  15. ...
  16.  
  17.  

 

TinyPortal © 2005-2018