Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a Text control in Measurement Studio for VC++?

I want to create a dialog with several text fields that indicate the status of my test. These fields will have different size fonts and text colors to begin with, then I want to be able to dynamically change the color depending on certain conditions. I think I know how to do it using the Microsoft edit and static controls, but it seems awfully painful. I've done this before with LabWindows and it was extremely easy. I've tried using the CWNumEdit control but obviously it doesn't let me display text-only strings. Is there a way to fool this control, or any other way to create a control similar to the Text control in LabWindows?? One that I can modify dynamically with a single call, rather than responding to multip
le windows messages.
0 Kudos
Message 1 of 4
(3,263 Views)
There are no text controls in Measurement Studio for VC++. Your best bet would be to use CStatic, CEdit, or CRichEditCtrl.

- Elton
0 Kudos
Message 2 of 4
(3,263 Views)
I have done this where a CNiNumEdit control shows values, but I want it to show an Overload warning sometimes. You could use a similar technique to show text always in the control.

Example, inside the square brackets is a string in my stringtable, [ "OL" .]
If you set this as the FormatString of your CNiNumEdit control you just see OL in the control. The actual value (denoted by the dot) gets pushed outside the viewable area.

Billy H.
Message 3 of 4
(3,263 Views)
Thanks. I knew there might be a way to fool this control. This works well as long as you don't click on the control, which makes the text string disappear and when it loses focus it right justifies the entire string.
0 Kudos
Message 4 of 4
(3,263 Views)