Page 1 of 1

Scintilla on Windows

Posted: Mon Aug 23, 2010 5:01 pm
by Polo
Hi,

Is there a possibility that the Scintilla gadget on Windows could be statically linked, like on Linux and MacOS ?

Thanks!

Re: Scintilla on Windows

Posted: Sat Aug 28, 2010 2:01 pm
by User_Russian
Orpeator IncludeBinary works wonders!

Code: Select all

 Procedure SCI_Callback(Gadget, *scinotify.SCNotification)
   Debug *scinotify.SCNotification\nmhdr\code
 
 EndProcedure
 
 LoadLibraryM(?mem)

 
   If OpenWindow(0, 450, 200, 402, 402, "Редактор Scintilla", #PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window_ScreenCentered|#PB_Window_SizeGadget)
    If CreateGadgetList(WindowID(0))
     ScintillaGadget(0, 2, 2, 398, 398, @SCI_Callback()) ; Создаём гаджет и процедуре SCI_Callback() присваиваем статус обработчика событий редактора.
    SmartWindowRefresh(0 ,1) ; Уменьшаем мерцания окна при изменении его размеров
    ScintillaSendMessage(0, #SCI_SETMARGINTYPEN, 0, #SC_MARGIN_NUMBER) ; Добавляем 0-вое поле для автонумерации строк
    ScintillaSendMessage(0, #SCI_SETMARGINWIDTHN, 0, 30) ; Ширина поля автонумерации
  Repeat    
   Event = WaitWindowEvent() 
   Gadget=EventGadget()
  
   If Event=#PB_Event_SizeWindow
    ; Изменяем размер редактора при изменении размеров окна
    ResizeGadget(0,#PB_Ignore,#PB_Ignore,WindowWidth(0)-4,WindowHeight(0)-2)
   EndIf
      
  Until Event=#PB_Event_CloseWindow 
 EndIf
EndIf

DataSection
 mem:
 IncludeBinary "Scintilla.dll"
EndDataSection
To compile the required library PBOSL

Re: Scintilla on Windows

Posted: Fri Sep 03, 2010 2:33 pm
by Suirad
only if you pray really hard.....

..... i heard it. wish granted: http://purebasic.fr/english/viewtopic.php?f=25&t=28542

and i confirm it working with go-scintilla