Ive been playing with Scintilla for a little while, and want to use PHP with it.
Thing is i cant seem to get any key words highlighted
what ever colour i set SCE_HPHP_DEFAULT to, it will color the key words and general text that colour, even if SCE_HPHP_WORD is set to something different.
Ive entered this as my code
note :
wEditor is the hWnd for the Scintilla editor window which has been defined.
LRESULT SendEditor(UINT Msg, WPARAM wParam=0, LPARAM lParam=0)
{
return ::SendMessage(wEditor, Msg, wParam, lParam);
}
void SetAStyle(int style, COLORREF fore, COLORREF back, int size, const char *face) {
SendEditor(SCI_STYLESETFORE, style, fore);
SendEditor(SCI_STYLESETBACK, style, back);
if (size >= 1)
SendEditor(SCI_STYLESETSIZE, style, size);
if (face)
SendEditor(SCI_STYLESETFONT, style, reinterpret_cast<LPARAM>(face));
}
SetAStyle(SCE_HPHP_DEFAULT, RGB(0, 0, 0));
SetAStyle(SCE_HPHP_HSTRING, RGB(0x80,0,0x80));
SetAStyle(SCE_HPHP_SIMPLESTRING, RGB(0x80,0,0x80));
SetAStyle(SCE_HPHP_WORD, RGB(250, 0, 55));
SetAStyle(SCE_HPHP_NUMBER, RGB(128, 0, 0));
SetAStyle(SCE_HPHP_VARIABLE, RGB(255, 125, 64));
SetAStyle(SCE_HPHP_COMMENT, RGB(0, 128, 0));
SetAStyle(SCE_HPHP_COMMENTLINE, RGB(0, 128, 0));
SetAStyle(SCE_HPHP_HSTRING_VARIABLE, RGB(0x80,0,0x80));
SetAStyle(SCE_HPHP_OPERATOR, RGB(128, 0, 128));
SetAStyle(SCE_HBA_STRING, RGB(0x80,0,0x80));
Everything else works fine such it should. SCE_HPHP_NUMBER, SCE_HPHP_VARIABLE, SCE_HPHP_COMMENT all seem fine.
Does anyone have anythoughts why SCE_HPHP_DEFAULT cancels out SCE_HPHP_WORD
If more code is required, please let me know
Thanks in advance
David