Implementing Spell.dll for AkelPad - AEN_TEXTCHANGED and AkelEdit API
Posted: Mon Aug 03, 2026 7:40 am
I am working on recreating Spell.dll for AkelPad 4.9.9 x86.
I already have a working base:
- the DLL compiles with MinGW32,
- AkelPad loads the plugin,
- these exports work:
DllAkelPadID
Spell_StartSpy
Spell_ReadText
I do not need a general description of AkelDLL.
I need the complete technical path required to build a working Spell.dll:
AkelEdit
↓
text change
↓
notification
↓
plugin DLL
↓
get text
↓
mark error
Please prepare a complete API map needed for a minimal Spell.dll.
1. CONNECTING A DLL PLUGIN WITH AKELPAD
Please explain exactly:
- which functions must be exported by a DLL plugin,
- the role of:
DllAkelPadID
Main
PLUGINCALLBACK
- whether the plugin must register a callback,
- whether AkelPad calls exported functions automatically,
- what the minimal DLL skeleton should look like.
2. RECEIVING TEXT CHANGES
I have this information:
"AEN_TEXTCHANGED and AEN_TEXTCHANGING are the way."
Please explain completely:
- who generates AEN_TEXTCHANGED,
- who receives it,
- how a plugin becomes a receiver,
- whether AKD_* or AKDN_* messages are required,
- which function in the DLL receives the notification.
Please provide:
- constant names,
- definitions,
- structures,
- complete data flow.
3. AEN_TEXTCHANGING VS AEN_TEXTCHANGED
Explain:
- when each notification is sent,
- what data is available,
- which one should be used for a spell checker.
Example goal:
When the user types:
kot_
(space after "kot")
the plugin should receive:
- text changed,
- last character is a space,
- previous word is "kot".
4. CHANGE DATA
Please provide complete definitions and usage of:
AECHANGENOTIFY
AECHANGEDATA
Explain:
- start position of the change,
- length of the change,
- old text,
- new text,
- line number,
- character index.
5. GETTING TEXT FROM AKELEDIT
I need exact methods for:
- getting the whole document,
- getting selected text,
- getting the current line,
- getting text around the cursor.
Please provide:
- AEM_* messages,
- structures,
- C++ usage examples.
6. CURSOR POSITION
I need:
- character index in the document,
- line number,
- column,
- screen coordinates.
Please provide:
- messages,
- structures,
- examples.
7. SELECTING THE WRONG WORD
I need:
- how to set a selection in AkelEdit,
- how to select a range from the beginning to the end of a word.
Please provide:
- AEM_* or AKD_* messages,
- structures,
- example code.
8. MINIMAL WORKING EXAMPLE
At the end, please provide a complete minimal C++ example:
DLL:
- starts in AkelPad,
- receives AEN_TEXTCHANGED,
- gets changed text,
- writes diagnostic output:
"text changed: ..."
Requirements:
- no timer,
- no polling every 500 ms,
- no subclassing window procedure.
The goal is the first working prototype:
AkelPad
↓
user types a character
↓
AEN_TEXTCHANGED
↓
Spell.dll
↓
read text
↓
dictionary analysis later
I already have a working base:
- the DLL compiles with MinGW32,
- AkelPad loads the plugin,
- these exports work:
DllAkelPadID
Spell_StartSpy
Spell_ReadText
I do not need a general description of AkelDLL.
I need the complete technical path required to build a working Spell.dll:
AkelEdit
↓
text change
↓
notification
↓
plugin DLL
↓
get text
↓
mark error
Please prepare a complete API map needed for a minimal Spell.dll.
1. CONNECTING A DLL PLUGIN WITH AKELPAD
Please explain exactly:
- which functions must be exported by a DLL plugin,
- the role of:
DllAkelPadID
Main
PLUGINCALLBACK
- whether the plugin must register a callback,
- whether AkelPad calls exported functions automatically,
- what the minimal DLL skeleton should look like.
2. RECEIVING TEXT CHANGES
I have this information:
"AEN_TEXTCHANGED and AEN_TEXTCHANGING are the way."
Please explain completely:
- who generates AEN_TEXTCHANGED,
- who receives it,
- how a plugin becomes a receiver,
- whether AKD_* or AKDN_* messages are required,
- which function in the DLL receives the notification.
Please provide:
- constant names,
- definitions,
- structures,
- complete data flow.
3. AEN_TEXTCHANGING VS AEN_TEXTCHANGED
Explain:
- when each notification is sent,
- what data is available,
- which one should be used for a spell checker.
Example goal:
When the user types:
kot_
(space after "kot")
the plugin should receive:
- text changed,
- last character is a space,
- previous word is "kot".
4. CHANGE DATA
Please provide complete definitions and usage of:
AECHANGENOTIFY
AECHANGEDATA
Explain:
- start position of the change,
- length of the change,
- old text,
- new text,
- line number,
- character index.
5. GETTING TEXT FROM AKELEDIT
I need exact methods for:
- getting the whole document,
- getting selected text,
- getting the current line,
- getting text around the cursor.
Please provide:
- AEM_* messages,
- structures,
- C++ usage examples.
6. CURSOR POSITION
I need:
- character index in the document,
- line number,
- column,
- screen coordinates.
Please provide:
- messages,
- structures,
- examples.
7. SELECTING THE WRONG WORD
I need:
- how to set a selection in AkelEdit,
- how to select a range from the beginning to the end of a word.
Please provide:
- AEM_* or AKD_* messages,
- structures,
- example code.
8. MINIMAL WORKING EXAMPLE
At the end, please provide a complete minimal C++ example:
DLL:
- starts in AkelPad,
- receives AEN_TEXTCHANGED,
- gets changed text,
- writes diagnostic output:
"text changed: ..."
Requirements:
- no timer,
- no polling every 500 ms,
- no subclassing window procedure.
The goal is the first working prototype:
AkelPad
↓
user types a character
↓
AEN_TEXTCHANGED
↓
Spell.dll
↓
read text
↓
dictionary analysis later