From bb6e97f6ccc6676d6cdb8e60a46856c84a169a44 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Tue, 31 Jul 2012 17:35:38 +0000 Subject: CrashDumper: Open only one window at a time git-svn-id: http://svn.miranda-ng.org/main/trunk@1286 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CrashDumper/src/crshdmp.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'plugins/CrashDumper/src') diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp index f5ce8b97ef..faaaf2d426 100644 --- a/plugins/CrashDumper/src/crshdmp.cpp +++ b/plugins/CrashDumper/src/crshdmp.cpp @@ -41,6 +41,8 @@ bool servicemode; bool clsdates; bool dtsubfldr; +extern HWND hViewWnd; + static const PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), @@ -142,9 +144,16 @@ INT_PTR ViewVersionInfo(WPARAM wParam, LPARAM) if (hRichModule == NULL && GetModuleHandle(TEXT("Riched20.dll")) == NULL) hRichModule = LoadLibrary(TEXT("Riched20.dll")); - - CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_VIEWVERSION), NULL, - DlgProcView, wParam ? (VI_FLAG_PRNVAR | VI_FLAG_PRNDLL) : VI_FLAG_PRNVAR); + if(hViewWnd) + { + SetForegroundWindow(hViewWnd); + SetFocus(hViewWnd); + } + else + { + CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_VIEWVERSION), NULL, + DlgProcView, wParam ? (VI_FLAG_PRNVAR | VI_FLAG_PRNDLL) : VI_FLAG_PRNVAR); + } return 0; } -- cgit v1.2.3