Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

ON_EVENT and IDC_APPLICATIONMGR for TestStand

I have a canned version of the MFC operator interface. I see that events are linked in this section:
 

ON_EVENT(CTestExecDlg, IDC_APPLICATIONMGR, 1, OnExitApplicationApplicationMgr, VTS_NONE)

ON_EVENT(CTestExecDlg, IDC_APPLICATIONMGR, 10, OnWaitApplicationMgr, VTS_BOOL)

ON_EVENT(CTestExecDlg, IDC_APPLICATIONMGR, 11, OnReportErrorApplicationMgr, VTS_I4 VTS_BSTR)

ON_EVENT(CTestExecDlg, IDC_APPLICATIONMGR, 22, OnDisplayExecutionApplicationMgr, VTS_DISPATCH VTS_I4)

ON_EVENT(CTestExecDlg, IDC_APPLICATIONMGR, 21, OnDisplaySequenceFileApplicationMgr, VTS_DISPATCH VTS_I4)

ON_EVENT(CTestExecDlg, IDC_LISTBAR, 2, OnCurPageChangedListbar, VTS_I4)

ON_EVENT(CTestExecDlg, IDC_APPLICATIONMGR, 23, OnDisplayReportApplicationMgr, VTS_DISPATCH)

ON_EVENT(CTestExecDlg, IDC_APPLICATIONMGR, 5, OnStartExecutionApplicationMgr, VTS_DISPATCH VTS_DISPATCH VTS_BOOL)

ON_EVENT(CTestExecDlg, IDC_EXECUTIONVIEWMGR, 1, OnExecutionChangedExecutionViewMgr, VTS_DISPATCH)

ON_EVENT(CTestExecDlg, IDC_LISTBAR, 3, OnCreateContextMenuListbar, VTS_I4 VTS_I4 VTS_I4)

ON_EVENT(CTestExecDlg, IDC_LISTBAR, 4, OnBorderDraggedListbar, VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_BOOL)

ON_EVENT(CTestExecDlg, IDC_APPLICATIONMGR, 16 , CTestExecDlg::OnQueryShutdownApplicationMgr, VTS_PI4)

ON_EVENT(CTestExecDlg, IDC_APPLICATIONMGR, 42, CTestExecDlg::EditModeChangedApplicationMgr, VTS_NONE)

 

I need to know how to create an event for a UIMESSAGE callback. I don't have any documentation these entries but am assuming the third parameter is the one that defines a UIMESSAGE through the application manager. Does anyone know how to connect this calback? Thanks.

0 Kudos
Message 1 of 3
(7,218 Views)
I found out that it can be pulled down from the properties box of the dialog resource. It generates a callback function:
 

void

CTestExecDlg::UIMessageEventApplicationmgr(LPDISPATCH uiMsg, BOOL* cancel)

 

I don't know how to use the parameter LPDISPATCH uiMsg.

 

I also tried the following

ui_message = mApplicationMgr->GetEngine()->GetUIMessage()

ui_message->get_Event(&ui_event_id)

But this does not work. I need to be able to obtain the event number and the message. I will also need to be able to post a message from this callback. How can I do this?

0 Kudos
Message 2 of 3
(7,217 Views)
 

Hi Steve,

The LPDISPATCH type is a typedef associated with the IDISPATCH type, which is defined in oaidl.h, a Windows SDK header file.  The LPDISPATCH type is used to pass values into many of the C++ functions used by the MFC operator interface.  You can investigate these files and see how it is used with the other functions in TestExecDlg.cpp.

These pages and forums all discuss using UI messages with TestStand and may be helpful if you haven't seen them already:

Using Default and Custom UIMessages
UI Message help - TestStand - NI Discussion Forums

I hope that helps!

 
Regards,


Marty H.
National Instruments
0 Kudos
Message 3 of 3
(7,195 Views)