Using Scintilla

This is a discussion on Using Scintilla within the Windows Programming forums, part of the Platform Specific Boards category; Anyone knows a good tutorial how to use Scintilla in Win32 API? The one in the Scintilla homepage doesn't create ...

  1. #1
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318

    Using Scintilla

    Anyone knows a good tutorial how to use Scintilla in Win32 API? The one in the Scintilla homepage doesn't create the box, (even downloaded the source, everything else is there, satus bar, menus etc. but the scintilla edit won't appear)
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    It should just be a case of loading the scintilla library with LoadLibrary and using CreateWindowEx with 'Scintilla' as the window class name to create a widget.

    Which example are you referring to?
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    I tried that. It also had the code. But it acts like the 'Scintilla' class is not even registered!

    I am referring to this: http://www.scintilla.org/dmapp.zip
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    It seems to work okay. Have you got the scintilla dll (SciLexer.dll) in the working directory?
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  5. #5
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Yes it is. It successfully loads the library, but the control still acts like the "Scintilla" class isn't registered. Tried precompiled SciLexer.dll and my own compiled SciLexer.dll...
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  6. #6
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    You'll need to be more specific. Is window class registration failing? If so what error code is returned from GetLastError? Is it window creation that fails? If so what error code is returned by GetLastError? When you say it succesfully loads the library, how are you verifying this?
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  7. #7
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    From what I've seen, only the scintilla edit control creation fails. I will see and look if it even fails. Should a window creation fail if you specify a classname that is not registered?

    Code:
    When you say it succesfully loads the library, how are you verifying this?
    I checked if it fails by checking if it fails, that's kind of a stupid answer but the question wasn't very good either.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  8. #8
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Please disregard my previous comment regarding window registration - I was unsure which window you were referring to. Still, the GetLastError error code returned after window(scintilla widget) creation failure would be useful.

    To be honest, though, the only way I can reproduce the behaviour I think you are describing from that sample code is if the scintilla library(scilexer.dll) is not loading.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  9. #9
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,236
    Maxorator, maybe it's better to post your code.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  10. #10
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Quote Originally Posted by maxorator
    I tried that. It also had the code. But it acts like the 'Scintilla' class is not even registered!

    I am referring to this: http://www.scintilla.org/dmapp.zip
    He already did.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21