I have a server that receives simultaneous client connections. I have mostly used the MultiClientServer sample provided by NI as a model to implement a server that uses multi-threading. I have up to 4 clients connecting, with each client sending information about its internal variables. My goal is to display this data in separate tabs depending of which client sent it. I have an array that holds the handle for each tab element,
static int ClientTABHandle[4] = {0,0,0,0};
When client connect and report their ID's, the ID is used to refer to the right ClientTABHandle when calling SetCtrlVal. For example,
SetCtrlVal(boardTABHandle[clientInfoPtr->clientID],<control name>, <value>);
The values in <> are symblic.
Now, this lets me use the right TAB handle at runtime depending on which client I am dealing with, but I can't find a way to refer to dynamically. Since UI controls are in separate tabs, each control would have a prefix of its TAB name. For example, if the TABs are called TABPANEL1, TABPANEL2, TABPANEL3 and TABPANEL 4, then a UI element on the first TAB would be referred to as TABPANEL1_CONTROLNAME. But how can I make a string at runtime that refers to a control and use that in the SetCtrlVal command? I do not like using Fmt as it will slow things down and plus, I dont know of a way to use a string that would evaluate to a control name.