LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

a numeric strange phenomenon

Solved!
Go to solution

hello ,

        There are many numeric controls in a panel,, when compiled it products an include file like this:

#define  DROP                             2
#define  DROP_RESIDUAL                    2       /* control type: graph, callback function: (none) */
#define  DROP_DROPVALUE                   3       /* control type: graph, callback function: (none) */
#define  DROP_CLOSEDROP                   4       /* control type: command, callback function: CloseRes */
#define  DROP_REJNUM                      5       /* control type: numeric, callback function: (none) */
#define  DROP_DPVAL                       6       /* control type: numeric, callback function: (none) */
#define  DROP_MEANVAL                     7       /* control type: numeric, callback function: (none) */
#define  DROP_ACEPNUM                     8       /* control type: numeric, callback function: (none) */
#define  DROP_DROPNUM                     9       /* control type: numeric, callback function: (none) */
#define  DROP_SETNUM                      10      /* control type: numeric, callback function: (none) */

   

However, it use this address rather than the above 
#define  DROP_REJNUM                      5       /* control type: numeric, callback function: (none) */
#define  DROP_DPVAL                       6       /* control type: numeric, callback function: (none) */
#define  DROP_MEANVAL                     8       /* control type: numeric, callback function: (none) */
#define  DROP_ACEPNUM                     8       /* control type: numeric, callback function: (none) */
#define  DROP_DROPNUM                     6       /* control type: numeric, callback function: (none) */
#define  DROP_SETNUM                      5     /* control type: numeric, callback function: (none) */.
 
what's wrong with them?  I didn't change the include file .
0 Kudos
Message 1 of 2
(2,607 Views)
Solution
Accepted by anyang

Nothing is wrong. Smiley Wink The constants are not unique and don't need to be. Only the combination of panel_handle and control_id needs to be unique and indeed is unique.

Message 2 of 2
(2,603 Views)