Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

riched20.dll system error on em_charfrompos

Featured Replies

Hi All - Looking for any suggestions one how to solve this problem. I wrote this program in VB6 and use the Sendmessage Api with EM_CHARFROMPOS to get the char position in a richtextbox from the cursor position (x,y) in order to identify the position when the mouse is moved over the richtextbox.

The program works 100% while I'm testing it, but when it is compiled, the .exe gives a windows systems error (you know the ones where you can send an error report to microsoft). This info identifies riched20.dll as the active process when the error occurred.

I tried switching to various versions of riched.dll, but the error persists. I wrote a second program, doing nothing else but to follow the mouse position in a richtextbox, with the same error result when I compile the program.

Can anyone give me any idea of what to do to get to the source of the problem? Any similar experiences? The code I've used look like this:-

In a module I declare:-

Public Type PointAPI

X as Long

Y as Long

End Type

Public Const EM_CHARFROMPOS = &HD7

Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _

lParam As Any) As Long

Then in the richtextbox mouse_move sub:-

Private Sub rchNote_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)

Dim lPos As Long

Dim pt As PointAPI

pt.x = x \ Screen.TwipsPerPixelX

pt.y = y \ Screen.TwipsPerPixelY

lPos = SendMessage(rchNote.hwnd, EM_CHARFROMPOS, ByVal CLng(0), ByVal pt)

if lPos >= 0 then

' Now here I look to see whether the mouse is over text with a hyperlink and change the mouse pointer to a hand and put the hyperlink in the ' tooltiptext property.

EndIf

End Sub

I took the code after the SendMessage call out, doing nothing further, and still get the error.

Any ideas? What am I missing? As I said, riched20.dll does not seem to be corrupted, as I tried various versions.

Thanks for your help.

tpine

VB is hard to read for me, but I *think* you have to pass pt ByRef. In C it should have to be a pointer to the struct.

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.