The MASM Forum Archive 2004 to 2012

Project Support Forums => MASM32 => Topic started by: greenhorn on February 19, 2009, 12:00:34 PM

Title: Riched20.inc Riched20.lib
Post by: greenhorn on February 19, 2009, 12:00:34 PM
Where can I find Riched20.inc Riched20.lib? I need the files only. I will take them by email.
Title: Re: Riched20.inc Riched20.lib
Post by: hutch-- on February 19, 2009, 12:10:10 PM
You don't. You create a richedit control with CreateWindowEx() AFTER loading whichever riched DLL using LoadLibrary.

Have a look at the richedit examples in MASM32, its reasonably straightforward once you know what to do to call it.
Title: Re: Riched20.inc Riched20.lib
Post by: ToutEnMasm on February 19, 2009, 01:21:56 PM

You can use the "ready to use SDk" and add the richedit.sdk.
Title: Re: Riched20.inc Riched20.lib
Post by: greenhorn on February 19, 2009, 05:01:19 PM
I appreciate the help, but I need the .inc and the .lib files.
Title: Re: Riched20.inc Riched20.lib
Post by: jj2007 on February 19, 2009, 05:07:20 PM
You don't need any include files.

sm equ invoke SendMessage, ; for faster typing ;-)

invoke LoadLibrary, chr$("RichEd20.dll")
mov hLib, eax
MyStyle = WS_EX_CLIENTEDGE
invoke CreateWindowEx, MyStyle, chr$("RichEdit20A"), NULL,
  WS_CHILD or WS_VISIBLE or WS_BORDER\
  or ES_LEFT or ES_AUTOVSCROLL or ES_AUTOHSCROLL or ES_MULTILINE or WS_VSCROLL, 0, 0, 0, 0,
  hWnd, IdEdit, hInstance, NULL
mov hEdit, eax ; we have created a RichEdit control
sm hEdit, EM_EXLIMITTEXT, 0, -1 ; text limit (default 64K
sm hEdit, EM_SETMARGINS, EC_LEFTMARGIN or EC_RIGHTMARGIN, 4


(excerpt from this thread (http://www.masm32.com/board/index.php?topic=10796.msg79088#msg79088))
Title: Re: Riched20.inc Riched20.lib
Post by: greenhorn on February 19, 2009, 05:17:33 PM
I guess this is too difficult for this forum, I will go look somewhere else.
Title: Re: Riched20.inc Riched20.lib
Post by: Jimg on February 19, 2009, 05:52:37 PM
From an older version of masm32

[attachment deleted by admin]
Title: Re: Riched20.inc Riched20.lib
Post by: donkey on February 19, 2009, 05:56:17 PM
Hi Greenhorn,

You can take a look at this header file, it has all the defs for richedit in it up to about Windows XP/Vista. It is not a MASM but a GoAsm compatible header so a bit of translating will be needed. For the lib file, RichEd20 has only a couple exports so you have no need of one, just call LoadLibrary and the control class is available to your application, GetProcAddress will get the named exports for you. You can include a RE control on a dialog as long as you load the library before you first call CreateDialogxxx, this at least saves you from CreateWindowEx. All of the equates and structures for MASM should be in Windows.inc but if you don't find one you should find it in this .H file.

And BTW, little jabs like "I guess this is too difficult for this forum" won't get you very far.

You can force load the DLL in GoAsm as follows, AFAIK MASM does not have this capability :

#dynamiclinkfile RICHED20.DLL
mov eax,[IID_ITextHost2] // Moves the address of a rich edit exported label into EAX, this will force the PELoader to map RICHED20.DLL

The named exports are
CreateTextServices
REExtendedRegisterClass
RichEdit10ANSIWndProc
RichEditANSIWndProc

[attachment deleted by admin]
Title: Re: Riched20.inc Riched20.lib
Post by: MichaelW on February 19, 2009, 06:08:16 PM
Quote from: greenhorn on February 19, 2009, 05:17:33 PM
I guess this is too difficult for this forum, I will go look somewhere else.

Judging from your forum name and the lack of any posts to indicate that you are not a beginner, I think that most of us are assuming that you have no idea of what you are asking, and that you are actually trying to do something reasonably normal. If you do have an idea of what you are asking then you should know that it's an unusual question for this forum, and not expect us to magically know what you actually want.
Title: Re: Riched20.inc Riched20.lib
Post by: greenhorn on February 19, 2009, 09:30:51 PM
Thanks Jimg. All of you guys, except for the one with the attitude, were very helpful and I do appreciate it. Have a great day. By the way, I am not green at machine language - older then the hills.
Title: Re: Riched20.inc Riched20.lib
Post by: Mark Jones on February 20, 2009, 06:15:46 AM
...and grumpier than the hills too! :bg
Title: Re: Riched20.inc Riched20.lib
Post by: hutch-- on February 20, 2009, 10:26:34 AM
Adding fuel to the fire, there are many people here who have successfully written rich edit code so its not like its a scret or a big deal. The method of calling either of the main richedit controls, (1) or (2 & later) are much the same, Load the richedit DLL with LoadLibrary(), use the Windows API reference for the styles and the richedit messages and use CreateWindowEx().

Neither myself or some of the other comments are guessing about how to write rishedit code, many of us have done it for YEARS. Instead of insisting there are files that simply don't exist, actually bother to learn how richedit works, API reference, Windows messages etc .....
Title: Re: Riched20.inc Riched20.lib
Post by: herge on February 26, 2009, 09:50:55 AM

Hi Greenhorn:

In C:\masm32\examples\poasm\riched
there is a File called strangely enough
richedit.asm  .Open this File and follow
the instructions at  top of the File.
You shoud be Rocking and Rolling
in under a minute. IE it Works!

You can also find more examples by
using a Search on your computer
with '*.asm' and search for a keyword
say 'richedit' or 'whatever' you want
to find.

Regards herge