I have a problem. I have two ScintillaGadgets and I want to connect both ScintillaGadgets with #SCI_GETDOCPOINTER and #SCI_SETDOCPOINTER.
This code works:
Code: Select all
EnableExplicit
InitScintilla()
Define PBScintillaPointer
If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ScintillaGadget(1, 0, 0, 500, 200, 0)
ScintillaGadget(2, 0, 200, 500, 200, 0)
PBScintillaPointer = SendMessage_(GadgetID(1), #SCI_GETDOCPOINTER, 0, 0)
SendMessage_(GadgetID(2), #SCI_SETDOCPOINTER, 0, PBScintillaPointer)
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
End
EndSelect
ForEver
EndIf
Program 1:
Code: Select all
EnableExplicit
InitScintilla()
Define PBScintillaPointer
If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ScintillaGadget(1, 0, 0, 500, 400, 0)
SendMessage_(GadgetID(1), #SCI_GETDOCPOINTER, 0, 0)
PBScintillaPointer = SendMessage_(GadgetID(1), #SCI_GETDOCPOINTER, 0, 0)
Debug PBScintillaPointer ;-Please copy the handle
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
End
EndSelect
ForEver
EndIf
Code: Select all
EnableExplicit
InitScintilla()
Define PBScintillaPointer
If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ScintillaGadget(1, 0, 0, 500, 400, 0)
PBScintillaPointer = 4552448 ;-Please insert the handle here.
SendMessage_(GadgetID(1), #SCI_SETDOCPOINTER, 0, PBScintillaPointer)
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
End
EndSelect
ForEver
EndIf
Can you help me?
It should be a new tool "SplitView" for PureBasic.