summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/mir_app.def1
-rw-r--r--src/mir_app/src/mir_app64.def1
-rw-r--r--src/mir_app/src/miranda.cpp14
3 files changed, 16 insertions, 0 deletions
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 210f167b8f..2820883800 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -1,6 +1,7 @@
LIBRARY mir_app.mir
EXPORTS
+Miranda_Close @1 NONAME
CallProtoService @2
Skin_LoadProtoIcon @4
Skin_LoadIcon @5
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 132aa6225b..6ed7f2a46a 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -1,6 +1,7 @@
LIBRARY mir_app.mir
EXPORTS
+Miranda_Close @1 NONAME
CallProtoService @2
Skin_LoadProtoIcon @4
Skin_LoadIcon @5
diff --git a/src/mir_app/src/miranda.cpp b/src/mir_app/src/miranda.cpp
index 423f709d75..214a196012 100644
--- a/src/mir_app/src/miranda.cpp
+++ b/src/mir_app/src/miranda.cpp
@@ -427,6 +427,20 @@ MIR_APP_DLL(bool) Miranda_OkToExit()
return NotifyEventHooks(hOkToExitEvent, 0, 0) == 0;
}
+MIR_APP_DLL(void) Miranda_Close()
+{
+ while (!Miranda_OkToExit()) {
+ MSG msg;
+ while (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ Sleep(0);
+ }
+
+ DestroyWindow(g_clistApi.hwndContactList);
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
// version functions