开发者

populating treeview content using C++

I need to populate a treeview in my vb form through my backend program (C++). Can someone provide me some guidance or e开发者_如何学Goxamples to do it? Thanks.


You need to create a simple text-based 'protocol' where your c++ backend can provide the data needed by the vb program to perform the population of the treeview control. As it's a treeview you are looking at a hierarchical protocol, something like:

node name1 attrib attrib
    node name2 attrib
    end node
    node name3 attrib attrib attrib
        node name4 attrib attrib
        ...
        end node
    end node
end node

Where attrib is something used to control what information is 'stored' in each leaf of the treeview. You might also want some way for the frontend to 'control' the backend, where the above response is the result of the command.

You need to use some form of interprocess communication (IPC) mechanism to get the information from the backend to the frontend. For Windows (I'm assuming you're using Windows?) you can use Named Pipes to perform the communication.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜