03-23-2017 07:22 AM
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.
Solved! Go to Solution.
03-23-2017 07:55 AM
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.
03-23-2017 08:28 AM
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
03-23-2017 08:33 AM
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
03-23-2017 08:40 AM
You have to delete it on the panel as well.....
03-23-2017 08:42 AM
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...
03-23-2017 08:58 AM - edited 03-23-2017 08:58 AM
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.....
03-23-2017 09:27 AM
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
03-23-2017 09:34 AM
Which version of VStudio have you tried?
03-23-2017 09:40 AM
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.