News:

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

Riched20.inc Riched20.lib

Started by greenhorn, February 19, 2009, 12:00:34 PM

Previous topic - Next topic

greenhorn

Where can I find Riched20.inc Riched20.lib? I need the files only. I will take them by email.

hutch--

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.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

ToutEnMasm


You can use the "ready to use SDk" and add the richedit.sdk.

greenhorn

I appreciate the help, but I need the .inc and the .lib files.

jj2007

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)

greenhorn

I guess this is too difficult for this forum, I will go look somewhere else.

Jimg

From an older version of masm32

[attachment deleted by admin]

donkey

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]
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

MichaelW

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.
eschew obfuscation

greenhorn

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.

Mark Jones

...and grumpier than the hills too! :bg
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

hutch--

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 .....
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

herge


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
// Herge born  Brussels, Belgium May 22, 1907
// Died March 3, 1983
// Cartoonist of Tintin and Snowy