|
-
Jan 22nd, 2018, 02:05 AM
#11
Thread Starter
Junior Member
Re: IDE crashing after running a program with subclassing
 Originally Posted by LaVolpe
Just saw something and maybe you can clarify.
You are using CopyMemory with the WM_NOTIFY message. That message specifically defines the lParam as a NMHDR structure. That structure only contains 3 Longs, not 8. This could be the cause of your crashes.
I am getting confused here.
Windows defines the ENLINK structure as such.
Contains information about an EN_LINK notification code from a rich edit control.
typedef struct {
NMHDR nmhdr;
UINT msg;
WPARAM wParam;
LPARAM lParam;
CHARRANGE chrg;
} ENLINK;
The first part is indeed a NMHDR Structure. The next 3 contain further info about the notification, which my code makes use of.
As in: If udtENLINK.msg = WM_LBUTTONDOWN Then LinkProcess(hwnd, udtENLINK.cpMin, udtENLINK.cpMax)
This does work, so I assumed it must be correct?
I suppose it SHOULD have been defined as:
Type NMHDR
hwndFrom As Long
idFrom As Long
code As Long
End Type
Type CHARRANGE
cpMin As Long
cpMax As Long
End Type
Private Type ENLINK
tNMHDR As NMHDR
msg As Long
wParam As Long
lParam As Long
chrg As CHARRANGE
End Type
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|