mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-22 13:24:42 +02:00
[BUG_FIXED] Detect the absence of Scintilla.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@786 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
c508aa94ef
commit
505fba9b79
@ -69,8 +69,13 @@ LRESULT Notepad_plus_Window::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPA
|
|||||||
{
|
{
|
||||||
case WM_CREATE:
|
case WM_CREATE:
|
||||||
{
|
{
|
||||||
_notepad_plus_plus_core._pPublicInterface = this;
|
try{
|
||||||
result = _notepad_plus_plus_core.init(hwnd);
|
_notepad_plus_plus_core._pPublicInterface = this;
|
||||||
|
result = _notepad_plus_plus_core.init(hwnd);
|
||||||
|
} catch (std::exception ex) {
|
||||||
|
::MessageBoxA(_notepad_plus_plus_core._pPublicInterface->getHSelf(), ex.what(), "Exception On WM_CREATE", MB_OK);
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -153,7 +153,7 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
|
|||||||
{
|
{
|
||||||
if (!_hLib)
|
if (!_hLib)
|
||||||
{
|
{
|
||||||
throw std::runtime_error("ScintillaEditView::init : SCINTILLA ERROR - Can not load the dynamic library");
|
throw std::exception("ScintillaEditView::init : SCINTILLA ERROR - Can not load the dynamic library");
|
||||||
}
|
}
|
||||||
|
|
||||||
Window::init(hInst, hPere);
|
Window::init(hInst, hPere);
|
||||||
@ -170,7 +170,7 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
|
|||||||
|
|
||||||
if (!_hSelf)
|
if (!_hSelf)
|
||||||
{
|
{
|
||||||
throw std::runtime_error("ScintillaEditView::init : CreateWindowEx() function return null");
|
throw std::exception("ScintillaEditView::init : CreateWindowEx() function return null");
|
||||||
}
|
}
|
||||||
|
|
||||||
_pScintillaFunc = (SCINTILLA_FUNC)::SendMessage(_hSelf, SCI_GETDIRECTFUNCTION, 0, 0);
|
_pScintillaFunc = (SCINTILLA_FUNC)::SendMessage(_hSelf, SCI_GETDIRECTFUNCTION, 0, 0);
|
||||||
@ -180,12 +180,12 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
|
|||||||
|
|
||||||
if (!_pScintillaFunc)
|
if (!_pScintillaFunc)
|
||||||
{
|
{
|
||||||
throw std::runtime_error("ScintillaEditView::init : SCI_GETDIRECTFUNCTION message failed");
|
throw std::exception("ScintillaEditView::init : SCI_GETDIRECTFUNCTION message failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_pScintillaPtr)
|
if (!_pScintillaPtr)
|
||||||
{
|
{
|
||||||
throw std::runtime_error("ScintillaEditView::init : SCI_GETDIRECTPOINTER message failed");
|
throw std::exception("ScintillaEditView::init : SCI_GETDIRECTPOINTER message failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
execute(SCI_SETMARGINMASKN, _SC_MARGE_FOLDER, SC_MASK_FOLDERS);
|
execute(SCI_SETMARGINMASKN, _SC_MARGE_FOLDER, SC_MASK_FOLDERS);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user