Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: PHP
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
Posted 13-Nov-12 11:32am
Comments
Peter_in_2780 at 13-Nov-12 17:52pm
   
You might do better changing your tags on the question. This doesn't look like a PHP issue to me, as in "my extensive PHP experience is of no use answering this question. What is Scintilla, anyway?"
 
Good luck,
Peter
Sergey Alexandrovich Kryukov at 13-Nov-12 18:34pm
   
Scintilla is a text editor and the library -- not too bad thing, frankly.
http://en.wikipedia.org/wiki/Scintilla_%28editing_component%29
--SA
Peter_in_2780 at 14-Nov-12 5:57am
   
I guessed that, but my point was really that PHP is a bad tag for the question.
 
Peter
Sergey Alexandrovich Kryukov at 14-Nov-12 11:26am
   
Oh, sure. I can see only C++ code sample, it looks like...
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 CPallini 550
1 Sergey Alexandrovich Kryukov 420
2 George Jonsson 288
3 Pheonyx 218
4 OriginalGriff 200
0 OriginalGriff 4,813
1 CPallini 3,850
2 Sergey Alexandrovich Kryukov 3,224
3 George Jonsson 2,552
4 Gihan Liyanage 2,186


Advertise | Privacy | Mobile
Web01 | 2.8.140905.1 | Last Updated 13 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100