summaryrefslogtreecommitdiff
path: root/win/Mainfrm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'win/Mainfrm.cpp')
-rw-r--r--win/Mainfrm.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/win/Mainfrm.cpp b/win/Mainfrm.cpp
index 35f92cf..e49d8d2 100644
--- a/win/Mainfrm.cpp
+++ b/win/Mainfrm.cpp
@@ -6,6 +6,7 @@
#include "MainFrm.h"
#include "Camera.h"
#include "project.h"
+#include "message.h"
#include "globals.h"
#include "Print.h"
@@ -18,6 +19,26 @@ static char THIS_FILE[] = __FILE__;
#define TOOLBAR_VERSION 1
+/*
+// if (type == 255) -> don't change current type
+void SystemUpdateFocus(void* object, unsigned char type)
+{
+ CWnd* pFrame = AfxGetMainWnd();
+ if (pFrame != NULL)
+ pFrame->PostMessage(WM_LC_UPDATE_INFO, (WPARAM)object, type);
+}
+*/
+
+void mainframe_listener (int message, void *data, void *user)
+{
+ if (message == LC_MSG_FOCUS_CHANGED)
+ {
+ CWnd* pFrame = AfxGetMainWnd();
+ if (pFrame != NULL)
+ pFrame->PostMessage(WM_LC_UPDATE_INFO, (WPARAM)data, 0);
+ }
+}
+
/////////////////////////////////////////////////////////////////////////////
// CMainFrame
@@ -178,6 +199,8 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
SetMenu (pMenu);
m_hMenuDefault = hMenu;
+ messenger->Listen (&mainframe_listener, this);
+
return 0;
}