I have two treeviews. One shows a two level structure. The other is built on the fly using data statements based on the node clicked in the first treeview. When the program initially presents the left tree view is populated automatically but the right does not. What I want is a way to click the first menu node on treeview one to crank up the code to build treeview 2.
So far the only method has been trial and error use SetCursorPos and the Mouse_event
This works ok, it is placed in a non active area of the treeview and when it fires it selects the first node by default and voila the TVN_SELCHANGED event is fired, the second treeview shows and the first item is drawn as selected.
The SetCursorPos however seems to be relative to the desktop instead of the dialog.
Is there a way using %NM_CLICK or something to programmatically click on demand any particular node in the first treeview to trigger the second treeview build.
When coming back to the menu from a called program I want a programmatic click to click the last menu node on the left that I used going to the program.
Bob Mechler
So far the only method has been trial and error use SetCursorPos and the Mouse_event
Code:
SetCursorPos 480,290 mouse_event %MOUSEEVENTF_LEFTDOWN OR %MOUSEEVENTF_ABSOLUTE, 480, 290, 0, 0 mouse_event %MOUSEEVENTF_LEFTUP OR %MOUSEEVENTF_ABSOLUTE, 480, 290, 0, 0
The SetCursorPos however seems to be relative to the desktop instead of the dialog.
Is there a way using %NM_CLICK or something to programmatically click on demand any particular node in the first treeview to trigger the second treeview build.
When coming back to the menu from a called program I want a programmatic click to click the last menu node on the left that I used going to the program.
Bob Mechler
Comment