Jump to content
Sign in to follow this  
BillLuvsU

Embedding Scite

Recommended Posts

BillLuvsU

Does anybody know how to embed scite in a GUI? I'm updating AutoIt studio and thought it would be cool to have a scite like editor instead of just an input box. I think I remember reading somewhere that you can do it with SciLexar.dll or somthing.


[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Share this post


Link to post
Share on other sites
BillLuvsU

I found this:

http://scintilla.sourceforge.net/Steps.html

but it's for c++ and dosn't seem to be translatable to AutoIt? any ideas?


[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Share this post


Link to post
Share on other sites
evilertoaster

ideas...sure

1. would be using dllcall to try and emulate the features...

idea 2. just do it in C++ and make it a plugin :shocked:

Share this post


Link to post
Share on other sites
BillLuvsU

Idea #1 wouldn't work because of how it works, creating a new Window type, whatever that is.

Idea #2 will work but I don't have a C++ compiler here at school. And It wouldn't be a plugin but a .dll file.


[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Share this post


Link to post
Share on other sites
BillLuvsU

Ok, this is what I came up with for the dll. But I can't test this (having no compiler). This look good? And could sombody test this? Basically one argument, hwnd type, that is the hwnd of the GUI you want to put it in... sooo

DllCall( "MyScite.dll", "hwnd", $MainGUIHandle )

#include "stdafx.h"
#include <iostream>

#ifdef _MANAGED
#pragma managed(push, off)
#endif

//This is where we define the externaly accessible function
extern "C" __declspec(dllexport)int embed(hwnd Parent)
{
     hmod = LoadLibrary("SciLexer.DLL");
        if (hmod==NULL)
        {
            return -1
        }
    hwndScintilla = CreateWindowEx(0,
        "Scintilla","", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_CLIPCHILDREN,
        10,10,500,400,Parent,(HMENU)GuiID, hInstance,NULL);
    return 1

}
BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                     )
{
    return TRUE;
}

#ifdef _MANAGED
#pragma managed(pop)
#endif

yes? no?

Edited by fear1313

[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Share this post


Link to post
Share on other sites
Uten

hmm, I know I'm afully late on this but you do know that site is manely based on scintilla? And a search for scintilla in Scripts will give you a lot of samples!

Oh, well I'm probably to late so just for the reference...:)

Share this post


Link to post
Share on other sites
Jos

hmm, I know I'm afully late on this but you do know that site is manely based on scintilla? And a search for scintilla in Scripts will give you a lot of samples!

Oh, well I'm probably to late so just for the reference...:)

.. but that would mean you have to write all SciTE functionality yourself ... :)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×