From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Popup massage

hello
How do show a popup massage whith number and not whith word
my code is:

char duree()
{
int D=0,tcp;
sscanf(tc, "%d", &tcp);
D=((n+1)+2)*tcp
return (D);
}

int D=0,tcp;
switch (event)
{
case EVENT_COMMIT:
tb[0] = duree();
MessagePopup ("Durée de l'essai",tb);
break;
case EVENT_RIGHT_CLICK:

break;
}

Thanks
0 Kudos
Message 1 of 3
(2,571 Views)
Why not formatting the number in a string?

char a[15];
sprintf (a, "%d", duree());
MessagePopup ("Durée de l'essai", a);

This provided duree(); function returns an integer instead of a char (char is limited to -128 to 127, or 0 to 256 if unsigned).

...or else I didn't understand your question!


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(2,562 Views)
Thank you all to your answer
I haven't think at this solution.
0 Kudos
Message 3 of 3
(2,557 Views)