12-17-2007 05:33 PM - edited 12-17-2007 05:35 PM
12-19-2007 01:03 AM
12-07-2016 12:53 PM
I'm experiencing the same runtime error described here. In my case, the function call looks like:
rootIndex = InsertTreeItem(panelHandle, controlID, VAL_SIBLING, 0, VAL_FIRST, "CCSDS_CADU", NULL, 0, NULL);
panelHandle is the value returned from the call to LoadPanel in the main() function. controlID is the macro that was added to the application header file for this tree control when I saved the .uir file. Is this the value I should be using for controlID?
Barry Wealand
12-07-2016 01:47 PM
In my case, I have the tree control contained within a tab control, and I was passing the main panel handle, rather than the tab panel handle, to InsertTreeItem. When I used the tab panel handle instead, problem solved.
Barry Wealand
12-09-2016 08:54 AM
It looks like the plDebugger_rgNest parameter does not correspond to a tree view control handle. Ensure that this constant name aligns with what is configured in your uir file.
Or 'plDebugger' you are using in panel handle parameter is really the panel name. In the first parameter of almost all User Interface library you must pass the panel handle, returned from the system when calling LoadPanel or similar functions. This is because you can have several instances of the same panel active in the system, each identified by the corresponding handle, not the panel name.
12-09-2016 08:55 AM
Barry_Wealand ha scritto:
In my case, I have the tree control contained within a tab control, and I was passing the main panel handle, rather than the tab panel handle, to InsertTreeItem. When I used the tab panel handle instead, problem solved.
Barry Wealand
You are right! Each page of a tab control can be considered as an independent panel, with its proper handle.