Travaux avec Scintilla
Publié : lun. 10/janv./2005 9:55
Je soushaite utiliser Scintilla pour un tool mais je n'y arrive pas. Personne n'aurait un code simple ?
Le Soldat Inconnu a écrit :un bazar pour faire de la colorisation syntaxique
elle est utilisée dans jaPBe par exemple
essaie de regarder les sources de jaPBe
Code : Tout sélectionner
Procedure SciEditGadget(hwndParent,x,y,w,h)
hmod = OpenLibrary(1, "SciLexer.dll")
If (hmod) = 0
MessageRequester( "Error loading Scintilla", "The Scintilla DLL could not be loaded.", #MB_OK | #MB_ICONERROR)
Else
hInstance = GetModuleHandle_(0)
hwndScintilla = CreateWindowEx_(0, "Scintilla"," ", #WS_CHILD|#WS_VISIBLE|#WS_TABSTOP,x,y,w,h,hwndParent,0,hInstance,0)
EndIf
ProcedureReturn hwndScintilla
EndProcedure
If OpenWindow(0, 100, 100, 320,240, #PB_Window_SystemMenu ,"PureBasic Test Window")
;create Edit Gadget
SciEditGadget(WindowID(),10,10,300,200)
Repeat
EventID.l = WaitWindowEvent()
Until EventID = #PB_EventCloseWindow
EndIf
End