NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

UI customization - delete buttons + resizing window

Solved!
Go to solution

Hi,

I am using the TestStand User Interface C++ Simple UI.

I would like to customize the UI, deleting or hiding some buttons (specifically, "Run MainSequence" and "Test UUTs").

Plus, I would like to allow the user to resize the main window.

 

Can anyone provide me with suggestions?

 

Thanks in advance,

Best regards,

Elena B.

0 Kudos
Message 1 of 23
(3,280 Views)

Elena,

 

first of all: Customizing UI is a topic in the TestStand 2 course from NI. You should attend it.

 

You can delete any element of the UI, but you have to delete the depending code as well. For buttons, this is most likely only the binding to one of the manager controls.

 

Resizing requires customized code. Please refer to the Full Featured UI example to review how that can be done.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 23
(3,273 Views)

Hi Norbert,

 

thanks a lot for your explanation.

The point is that my customer just want this small modification to be done in a quick time, so I please yo,u if you can give me some more detailed information about how to implement it. This is why I can't attend a course at the moment...  I guess it should not be a long job, provided one knows where to put hands on... 😉

Thanks a lot,

Elena

0 Kudos
Message 3 of 23
(3,261 Views)

By the way, I have already tried to eliminate all references to the two buttons and the related connections to code.

In particular, I tried commenting (for the "Run MainSequence" button):

 

mRunSelectedBtnCWnd.Attach(GetDlgItem(IDC_RUNSELECTEDSEQUENCEBTN)->m_hWnd);

mRunSelectedBtn = mRunSelectedBtnCWnd.GetControlUnknown();

mSequenceFileViewMgr->ConnectCommand(mRunSelectedBtn, CommandKind_RunCurrentSequence, 0, CommandConnection_EnableImage); 

 

but the button is still there.

 

Plus I tried with something like:

mRunSelectedBtn->Enabled = false;

and it does not work...

 

Thanks,

best regards,

Elena

0 Kudos
Message 4 of 23
(3,259 Views)

You have to delete it on the panel as well.....

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 23
(3,256 Views)

Could you please tell me where exactly? 🙂

I have searched for all references of these two pointers, but found no more than those above listed...

0 Kudos
Message 6 of 23
(3,254 Views)

The panel information is located in the *.rc files. Visual Studio 2013 (and i assume newer) does not have a proper editor embedded to display the resources as panel.

I recommend you to dump the MFC based UI and move to either LV, CVI or .NET as things are a multitude easier there.....

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 7 of 23
(3,248 Views)

I am sorry I can't. I must try to fix this using C++ only. Is there a way to do it, though less easy?

thanks,

best regards

Elena

0 Kudos
Message 8 of 23
(3,243 Views)

Which version of VStudio have you tried?

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 9 of 23
(3,241 Views)

A couple of tries later, i was able to open the rc in editor using VStudio 2013. You have to select TestExec.rc by right click and select 'open with'. Select the resource editor (second entry). If there are dialog(s) about 'is already opened' and 'do you trust', press YES. Now the main window should show the content of the rc file with four entries.

Select Dialog >> IDD_TESTEXEC_DIALOG and double click it. It should now open for editing.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 10 of 23
(3,239 Views)