From c5a692dbf8fec7248fc3f384174c4899dd5aa036 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 29 Dec 2001 01:52:53 +0000 Subject: Using HINSTANCE from Scintilla_RegisterClasses to find cursor so that static builds within DLLs will work. --- win32/PlatWin.cxx | 2 +- win32/ScintillaWin.cxx | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 9befd3f78..c6adbf327 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -716,7 +716,7 @@ void Window::SetFont(Font &font) { reinterpret_cast(font.GetID()), 0); } -static HINSTANCE hinstPlatformRes = 0; +HINSTANCE hinstPlatformRes = 0; void Window::SetCursor(Cursor curs) { switch (curs) { diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 37297e0bf..1293d0737 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1879,9 +1879,12 @@ sptr_t PASCAL ScintillaWin::SWndProc( } } +extern HINSTANCE hinstPlatformRes; + // This function is externally visible so it can be called from container when building statically void Scintilla_RegisterClasses(void *hInstance) { - ScintillaWin::Register(reinterpret_cast(hInstance)); + hinstPlatformRes = reinterpret_cast(hInstance); + ScintillaWin::Register(hinstPlatformRes); } #ifndef STATIC_BUILD -- cgit v1.2.3