LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

MACRO for no panel or no control

Is there a default value for no panel or no control like -1 that can be used to initialize a varible that has not been assigned the value of a valid control or panel.

BTW, it would be nice to have structs predefined in your headers for controls, example:
typedef struct _CONTROL {
int panel_id;
int control_id;
} CTRL, *pCTRL;

This would make it easier to pass data to funtions. Or maybe provide access to the internal data struct for controls through a fucntion like
pointerControl = GetControlStruct(); and it would return all control values like position, pointer to buffer of the data, panel id and control id, and what ever else controls have. I suppose it would not be too hard to write wrppers arround the GetCtrlAttribute to do so,
but it would be nice to hav these.
0 Kudos
Message 1 of 2
(2,801 Views)
Hello,

Any negative number should be an invalid control ID (as per the return value of NewCtrl). So -1 should work fine. The best place to submit suggestions like these would be the product feedback link in the contact NI section of ni.com:
http://sine.ni.com/apps/we/nicc.call_me?p_action=country&p_lang_id=US

Regards,
Ryan K.
0 Kudos
Message 2 of 2
(2,801 Views)