Jump to content

Embedding Scite


Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 month later...

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...:)

Link to comment
Share on other sites

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...