LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

cwnumedit to integer

How Do i convert a cwnumedit variable to an integer?


Thanks

Sorry if this is already posted and thanks for the help in advance.
0 Kudos
Message 1 of 2
(2,772 Views)

Hello surferboy,

If you are try to use the CWNumEdit ActiveX control, you should do the following steps:

1. Get a handle to the ActiveX control.

GetObjHandleFromActiveXCtrl (panelHandle, PANEL_CWNUMEDIT, &numEditCtrl);

2. Get the value of the NumEdit control.

CWUIControlsLib__DCWNumEditGet_Value (numEditCtrl, NULL, &variantval);

3. Convert the variant into an integer.

CA_VariantConvertToType (&variantval, CAVT_INT, &intval);

Hope that helps.

Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 2 of 2
(2,759 Views)