Use Scintilla with MaxGUI

BlitzMax Forums/MaxGUI Module/Use Scintilla with MaxGUI

seyhajin(Posted 2006) [#1]
This is a little code for use Scintilla Library with MaxGUI.
Scintilla with SendMessage system, see a scintilla_const.bmx to view all constants definitions and see a official website http://www.scintilla.org for help.

Download files : http://bond357.free.fr/main/portail/index.php?/downloads/2/15

Fun coding !


seyhajin(Posted 2006) [#2]
A another code worked without MaxGUI, but not adapted.

Include "scintilla_const.bmx"
Include "scintilla_struct.bmx"

Global SCI_LIBRARY = LoadLibraryA("SciLexer.dll")
Global SCI_MSGPTR:Byte Ptr = GetProcAddress(SCI_LIBRARY,"Scintilla_DirectFunction")

Graphics 800,600
Local hWnd = GetActiveWindow()
Local hRect[]

GetClientRect(hWnd , hRect)
Global SCI_HWND = CreateWindowExA( WS_EX_CLIENTEDGE , "Scintilla" , "" , WS_CHILD | WS_VISIBLE , ..
                              hRect[0] , hRect[1] , hRect[2]-hRect[0] , hRect[3]-hRect[1] , ..
                              hWnd , 0 , GetModuleHandleA(0) , "")
SetParent_(SCI_HWND , hWnd)

SendMessageA(SCI_HWND , SCI_STYLESETFONT , STYLE_DEFAULT , "Verdana".ToInt() )
SendMessageA(SCI_HWND , SCI_STYLESETSIZE , STYLE_DEFAULT , 9 )
SendMessageA(SCI_HWND , SCI_STYLESETBOLD , STYLE_DEFAULT , True )
    
' BOUCLE
While Not AppTerminate()
    
Wend

End



kfprimm(Posted 2006) [#3]
untested but i'm sure it's right.
Local width,height,Rect[4]
GetClientRect hwnd,Rect
width=Rect[2]-Rect[0]
height=Rect[3]-Rect[1]



seyhajin(Posted 2006) [#4]
Thanks Khomy !

I Redit my post.