summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ExternalAPI/m_NewStory.h9
-rw-r--r--plugins/NewStory/src/history_svc.cpp7
2 files changed, 16 insertions, 0 deletions
diff --git a/plugins/ExternalAPI/m_NewStory.h b/plugins/ExternalAPI/m_NewStory.h
index 9350672f62..ef2a247426 100644
--- a/plugins/ExternalAPI/m_NewStory.h
+++ b/plugins/ExternalAPI/m_NewStory.h
@@ -25,6 +25,15 @@ enum
};
/////////////////////////////////////////////////////////////////////////////////////////
+// NS get SRMM dialog
+// returns a pointer to the parent SRMM dialog, if used as a log window, or nullptr otherwise
+
+__forceinline CSrmmBaseDialog* NS_GetSrmm(HANDLE hwnd)
+{
+ return (CSrmmBaseDialog *)CallService("NewStory/GetSrmm", WPARAM(hwnd), 0);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
// NS get current event
__forceinline MEVENT NS_GetCurrent(HANDLE hwnd)
diff --git a/plugins/NewStory/src/history_svc.cpp b/plugins/NewStory/src/history_svc.cpp
index 9043ed95fe..e8dc1a154f 100644
--- a/plugins/NewStory/src/history_svc.cpp
+++ b/plugins/NewStory/src/history_svc.cpp
@@ -27,6 +27,12 @@ static INT_PTR SvcGetCurrent(WPARAM wParam, LPARAM)
return 0;
}
+static INT_PTR SvcGetSrmm(WPARAM wParam, LPARAM)
+{
+ auto *pData = (NewstoryListData *)wParam;
+ return (pData) ? INT_PTR(pData->pMsgDlg) : 0;
+}
+
static INT_PTR SvcGetSelection(WPARAM wParam, LPARAM lParam)
{
auto *pData = (NewstoryListData *)wParam;
@@ -51,6 +57,7 @@ static INT_PTR SvcGetSelection(WPARAM wParam, LPARAM lParam)
void InitServices()
{
+ CreateServiceFunction("NewStory/GetSrmm", &SvcGetSrmm);
CreateServiceFunction("NewStory/GetCurrent", &SvcGetCurrent);
CreateServiceFunction("NewStory/GetSelection", &SvcGetSelection);
}