News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

RichEdit.

Started by G`HOST, February 11, 2006, 06:47:48 AM

Previous topic - Next topic

G`HOST

1.How can i change default color of the selection in richedit control ?
2.How to use SetWindowLong to change the "dwStyle" member of richedit.
invoke SetWindowLong,hEdit,GWL_STYLE,0x50310004
: error A2206: missing operator in expression
: error A2114: INVOKE argument type mismatch : argument : 3

What am i doing wrong ?or is there some other way ?
what i am trying to do is implement word wrap functionality in to it.something like notepad has.

tenkey

MASM doesn't accept C style hex constants.

Change that constant to 50310004h.
A programming language is low level when its programs require attention to the irrelevant.
Alan Perlis, Epigram #8

PBrennick

G`HOST,
As for WordWrap, if you are taliking about the RichEdit example that comes with the project, the attached file is that project and it has been modified to include WordWrap.  It was easier to do that then emplain it all.  Look for the WordWrap procedure and you will see how it is done.

Paul

[attachment deleted by admin]
The GeneSys Project is available from:
The Repository or My crappy website

Mincho Georgiev

Hi, G'HOST, how you doin' ? Did the collar bone get health ?

G`HOST

Hey thanx all,
shaka_zulu
                  Ya,pretty much fine,stll cant move my arm though.Will be fine soon :bg Thanx

ramguru

Quote from: G`HOST on February 11, 2006, 06:47:48 AM
1.How can i change default color of the selection in richedit control ?
Why not use scintilla instead of richedit, I can help using this control in asm.

PBrennick

What is Scintilla?

EDIT:  Did you notice that it is written in VC?  97 source files?  No thanks, but thanks for asking.  We do assembly here.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

ramguru

Quote from: PBrennick on February 16, 2006, 03:17:24 AM
What is Scintilla?
Scintilla is the most powerfull edit control in the universe (OK maybe world)
Quote from: PBrennick on February 16, 2006, 03:17:24 AM
EDIT:  Did you notice that it is written in VC?  97 source files?  No thanks, but thanks for asking.  We do assembly here.
Paul don't be mossback... To get a dll you'll need to compile it with say MinGW or grab it from Scite. You need only LoadLibrary and class name in CreateWindowEx to make it work (the same thing with richedit). Size of control can vary (200-580Kb and more), depends on number of lexers (hilighting schemes). To communicate with scintilla you SendMessage (or something esle). I wonder why there is no Asm IDE based on it. Btw there is a posibility to confront with C++ when you're writting your lexer (say want folding feature in asm scheme).


G`HOST

Quote from: ramguru on February 15, 2006, 10:04:45 PM
Why not use scintilla instead of richedit, I can help using this control in asm.
Your Help Would be much appreciated.Thanx.

ramguru

Hi G'HOST,
I've coded a little example using Scintilla, this example demonstrates how to change selection colors as you were asking... If you want more: syntax hilighting, folding, autocompletion etc. ask... (the dll in atachment contains all lexers(C++\Java\Asm.....) so "weighs" respectively)

[attachment deleted by admin]

PBrennick

ramguru,
I have to admit that I am pretty impressed by your example.  I played with pasting code into it, etc.  Is there some sort of documentation for the functions served by the DLL?

Paul
The GeneSys Project is available from:
The Repository or My crappy website

ramguru

Quote from: PBrennick on February 16, 2006, 05:43:51 PM
I have to admit that I am pretty impressed by your example.
I'm glad you are. The documentation of course exist, it's here http://scintilla.sourceforge.net/ScintillaDoc.html . You've to use SciSend instead of SendMessage as in the example (it's much faster). I have some experience with it, so if there are any questions...

PBrennick

It says in the documentation that it is not meant to be used as a wordprocessor.  That is too bad as that is what we are doing.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

ramguru

Well I think word processor means MS Word or alike where we use different fonts even in the same line. But the control is perfect Richedit replacement, perfect for some IDE etc.

PBrennick

Do you have an example of it being used as an editor?

Paul
The GeneSys Project is available from:
The Repository or My crappy website