Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
(Solved)...TreeView info
#1

In the TreeView in QM where you select the macro you are going to edit, how do I tell if I have seleted a folder or a macro or function.

I know that .getmacro("" 3) will get the selected macro or functions type but it will not get the selected folder type if a folder is selected it just gets the last selected.
#2
Code:
Copy      Help
int htv=id(2202 _hwndqm) ;;get QM tree view handle (HWND)
int hitem=SendMessage(htv TVM_GETNEXTITEM TVGN_CARET 0) ;;get selected item (HTREEITEM)
int iid=TvGetParam(htv hitem) ;;get lParam. It is QM item id. This function is in System. It is private, but it is safe to use in macros.
QMITEM qi; qmitem(iid 0 qi) ;;get QM item info
sel qi.itype ;;see qmitem in QM help
,case 0 out "macro"
,case 1 out "function"
,case 2 out "menu"
,case 3 out "tb"
,case 4 out "tsm"
,case 5 out "folder"
,case 6 out "member f"
#3

Wow I have been trying to do this for about 3 hours and I dont think I would have ever got that.

THANNKS SO MUCH.
#4

Is there a way of telling if folder is a Child of another folder.

[Image: 2u7c589.jpg]
#5
qmitem can get parent folder id.
#6

Thanks, I think this will work just fine.


Forum Jump:


Users browsing this thread: 2 Guest(s)