aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc/ScintillaHistory.html13
-rw-r--r--win32/ScintillaWin.cxx29
2 files changed, 36 insertions, 6 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 487fd3719..bf2e15ca4 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -454,6 +454,7 @@
<td>Vicente</td>
<td>Nick Gravgaard</td>
<td>Ian Goldby</td>
+ <td>Holger Stenger</td>
</tr>
</table>
<p>
@@ -473,6 +474,18 @@
Released 13 August 2014.
</li>
<li>
+ On Windows only unregister windows classes registered..
+ <a href="http://sourceforge.net/p/scintilla/bugs/1639/">Bug #1639</a>.
+ </li>
+ </ul>
+ <h3>
+ <a href="http://prdownloads.sourceforge.net/scintilla/scite350.zip?download">Release 3.5.0</a>
+ </h3>
+ <ul>
+ <li>
+ Released 13 August 2014.
+ </li>
+ <li>
Text may share space vertically so that extreme ascenders and descenders are
not cut off by calling SCI_SETPHASESDRAW(SC_PHASES_MULTIPLE).
</li>
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index c5dcd8559..b69b3cadb 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -204,6 +204,8 @@ class ScintillaWin :
DropTarget dt;
static HINSTANCE hInstance;
+ static ATOM scintillaClassAtom;
+ static ATOM callClassAtom;
#if defined(USE_D2D)
ID2D1HwndRenderTarget *pRenderTarget;
@@ -335,6 +337,8 @@ private:
};
HINSTANCE ScintillaWin::hInstance = 0;
+ATOM ScintillaWin::scintillaClassAtom = 0;
+ATOM ScintillaWin::callClassAtom = 0;
ScintillaWin::ScintillaWin(HWND hwnd) {
@@ -2815,7 +2819,8 @@ bool ScintillaWin::Register(HINSTANCE hInstance_) {
wndclass.lpszMenuName = NULL;
wndclass.lpszClassName = L"Scintilla";
wndclass.hIconSm = 0;
- result = ::RegisterClassExW(&wndclass) != 0;
+ scintillaClassAtom = ::RegisterClassExW(&wndclass);
+ result = 0 != scintillaClassAtom;
} else {
// Register Scintilla as a normal character window
@@ -2832,7 +2837,8 @@ bool ScintillaWin::Register(HINSTANCE hInstance_) {
wndclass.lpszMenuName = NULL;
wndclass.lpszClassName = scintillaClassName;
wndclass.hIconSm = 0;
- result = ::RegisterClassEx(&wndclass) != 0;
+ scintillaClassAtom = ::RegisterClassEx(&wndclass);
+ result = 0 != scintillaClassAtom;
}
if (result) {
@@ -2851,16 +2857,27 @@ bool ScintillaWin::Register(HINSTANCE hInstance_) {
wndclassc.lpszClassName = callClassName;
wndclassc.hIconSm = 0;
- result = ::RegisterClassEx(&wndclassc) != 0;
+ callClassAtom = ::RegisterClassEx(&wndclassc);
+ result = 0 != callClassAtom;
}
return result;
}
bool ScintillaWin::Unregister() {
- bool result = ::UnregisterClass(scintillaClassName, hInstance) != 0;
- if (::UnregisterClass(callClassName, hInstance) == 0)
- result = false;
+ bool result = true;
+ if (0 != scintillaClassAtom) {
+ if (::UnregisterClass(MAKEINTATOM(scintillaClassAtom), hInstance) == 0) {
+ result = false;
+ }
+ scintillaClassAtom = 0;
+ }
+ if (0 != callClassAtom) {
+ if (::UnregisterClass(MAKEINTATOM(callClassAtom), hInstance) == 0) {
+ result = false;
+ }
+ callClassAtom = 0;
+ }
return result;
}